From 5830309bf4cd73ecca9c94e11f549ef3495409be Mon Sep 17 00:00:00 2001 From: "DESKTOP-S4BOTN2\\user" Date: Sat, 3 May 2025 19:48:48 +0900 Subject: [PATCH] =?UTF-8?q?ADD=20:=20=EB=A6=B4=ED=88=B0=20=EC=89=90?= =?UTF-8?q?=EC=9D=B4=EB=8D=94=20=EC=97=85=EB=A1=9C=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/External/lilToon.meta | 8 + .../External/lilToon/BaseShaderResources.meta | 8 + .../lilCustomShaderDatas.lilblock | 2 + .../lilCustomShaderDatas.lilblock.meta | 7 + .../BaseShaderResources/lts.lilinternal | 17 + .../BaseShaderResources/lts.lilinternal.meta | 7 + .../lts_cutout.lilinternal | 17 + .../lts_cutout.lilinternal.meta | 7 + .../lts_cutout_o.lilinternal | 17 + .../lts_cutout_o.lilinternal.meta | 7 + .../lts_cutout_oo.lilinternal | 17 + .../lts_cutout_oo.lilinternal.meta | 7 + .../lts_fakeshadow.lilinternal | 15 + .../lts_fakeshadow.lilinternal.meta | 7 + .../BaseShaderResources/lts_fur.lilinternal | 20 + .../lts_fur.lilinternal.meta | 7 + .../lts_fur_cutout.lilinternal | 20 + .../lts_fur_cutout.lilinternal.meta | 7 + .../lts_fur_two.lilinternal | 20 + .../lts_fur_two.lilinternal.meta | 7 + .../lts_furonly.lilinternal | 17 + .../lts_furonly.lilinternal.meta | 7 + .../lts_furonly_cutout.lilinternal | 17 + .../lts_furonly_cutout.lilinternal.meta | 7 + .../lts_furonly_two.lilinternal | 17 + .../lts_furonly_two.lilinternal.meta | 7 + .../BaseShaderResources/lts_gem.lilinternal | 20 + .../lts_gem.lilinternal.meta | 7 + .../BaseShaderResources/lts_o.lilinternal | 17 + .../lts_o.lilinternal.meta | 7 + .../lts_onetrans.lilinternal | 17 + .../lts_onetrans.lilinternal.meta | 7 + .../lts_onetrans_o.lilinternal | 17 + .../lts_onetrans_o.lilinternal.meta | 7 + .../BaseShaderResources/lts_oo.lilinternal | 17 + .../lts_oo.lilinternal.meta | 7 + .../lts_overlay.lilinternal | 17 + .../lts_overlay.lilinternal.meta | 7 + .../lts_overlay_one.lilinternal | 17 + .../lts_overlay_one.lilinternal.meta | 7 + .../BaseShaderResources/lts_ref.lilinternal | 20 + .../lts_ref.lilinternal.meta | 7 + .../lts_ref_blur.lilinternal | 20 + .../lts_ref_blur.lilinternal.meta | 7 + .../BaseShaderResources/lts_tess.lilinternal | 17 + .../lts_tess.lilinternal.meta | 7 + .../lts_tess_cutout.lilinternal | 17 + .../lts_tess_cutout.lilinternal.meta | 7 + .../lts_tess_cutout_o.lilinternal | 17 + .../lts_tess_cutout_o.lilinternal.meta | 7 + .../lts_tess_o.lilinternal | 17 + .../lts_tess_o.lilinternal.meta | 7 + .../lts_tess_onetrans.lilinternal | 17 + .../lts_tess_onetrans.lilinternal.meta | 7 + .../lts_tess_onetrans_o.lilinternal | 17 + .../lts_tess_onetrans_o.lilinternal.meta | 7 + .../lts_tess_trans.lilinternal | 17 + .../lts_tess_trans.lilinternal.meta | 7 + .../lts_tess_trans_o.lilinternal | 17 + .../lts_tess_trans_o.lilinternal.meta | 7 + .../lts_tess_twotrans.lilinternal | 17 + .../lts_tess_twotrans.lilinternal.meta | 7 + .../lts_tess_twotrans_o.lilinternal | 17 + .../lts_tess_twotrans_o.lilinternal.meta | 7 + .../BaseShaderResources/lts_trans.lilinternal | 17 + .../lts_trans.lilinternal.meta | 7 + .../lts_trans_o.lilinternal | 17 + .../lts_trans_o.lilinternal.meta | 7 + .../lts_trans_oo.lilinternal | 17 + .../lts_trans_oo.lilinternal.meta | 7 + .../lts_twotrans.lilinternal | 17 + .../lts_twotrans.lilinternal.meta | 7 + .../lts_twotrans_o.lilinternal | 17 + .../lts_twotrans_o.lilinternal.meta | 7 + .../BaseShaderResources/ltsl.lilinternal | 17 + .../BaseShaderResources/ltsl.lilinternal.meta | 7 + .../ltsl_cutout.lilinternal | 17 + .../ltsl_cutout.lilinternal.meta | 7 + .../ltsl_cutout_o.lilinternal | 17 + .../ltsl_cutout_o.lilinternal.meta | 7 + .../BaseShaderResources/ltsl_o.lilinternal | 17 + .../ltsl_o.lilinternal.meta | 7 + .../ltsl_onetrans.lilinternal | 17 + .../ltsl_onetrans.lilinternal.meta | 7 + .../ltsl_onetrans_o.lilinternal | 17 + .../ltsl_onetrans_o.lilinternal.meta | 7 + .../ltsl_overlay.lilinternal | 17 + .../ltsl_overlay.lilinternal.meta | 7 + .../ltsl_overlay_one.lilinternal | 17 + .../ltsl_overlay_one.lilinternal.meta | 7 + .../ltsl_trans.lilinternal | 17 + .../ltsl_trans.lilinternal.meta | 7 + .../ltsl_trans_o.lilinternal | 17 + .../ltsl_trans_o.lilinternal.meta | 7 + .../ltsl_twotrans.lilinternal | 17 + .../ltsl_twotrans.lilinternal.meta | 7 + .../ltsl_twotrans_o.lilinternal | 17 + .../ltsl_twotrans_o.lilinternal.meta | 7 + .../BaseShaderResources/ltsmulti.lilinternal | 16 + .../ltsmulti.lilinternal.meta | 7 + .../ltsmulti_fur.lilinternal | 16 + .../ltsmulti_fur.lilinternal.meta | 7 + .../ltsmulti_gem.lilinternal | 16 + .../ltsmulti_gem.lilinternal.meta | 7 + .../ltsmulti_o.lilinternal | 16 + .../ltsmulti_o.lilinternal.meta | 7 + .../ltsmulti_ref.lilinternal | 16 + .../ltsmulti_ref.lilinternal.meta | 7 + .../ltspass_baker.lilinternal | 222 ++ .../ltspass_baker.lilinternal.meta | 7 + .../ltspass_cutout.lilinternal | 17 + .../ltspass_cutout.lilinternal.meta | 7 + .../ltspass_lite_cutout.lilinternal | 17 + .../ltspass_lite_cutout.lilinternal.meta | 7 + .../ltspass_lite_opaque.lilinternal | 17 + .../ltspass_lite_opaque.lilinternal.meta | 7 + .../ltspass_lite_transparent.lilinternal | 17 + .../ltspass_lite_transparent.lilinternal.meta | 7 + .../ltspass_opaque.lilinternal | 17 + .../ltspass_opaque.lilinternal.meta | 7 + .../ltspass_proponly.lilinternal | 21 + .../ltspass_proponly.lilinternal.meta | 7 + .../ltspass_tess_cutout.lilinternal | 17 + .../ltspass_tess_cutout.lilinternal.meta | 7 + .../ltspass_tess_opaque.lilinternal | 17 + .../ltspass_tess_opaque.lilinternal.meta | 7 + .../ltspass_tess_transparent.lilinternal | 17 + .../ltspass_tess_transparent.lilinternal.meta | 7 + .../ltspass_transparent.lilinternal | 17 + .../ltspass_transparent.lilinternal.meta | 7 + Assets/External/lilToon/CHANGELOG.md | 3 + Assets/External/lilToon/CHANGELOG.md.meta | 7 + Assets/External/lilToon/CHANGELOG_JP.md | 3 + Assets/External/lilToon/CHANGELOG_JP.md.meta | 7 + .../lilToon/CustomShaderResources.meta | 8 + .../lilToon/CustomShaderResources/BRP.meta | 8 + .../BRP/Default.lilblock | 326 +++ .../BRP/Default.lilblock.meta | 7 + .../BRP/DefaultFakeShadow.lilblock | 70 + .../BRP/DefaultFakeShadow.lilblock.meta | 7 + .../BRP/DefaultFur.lilblock | 286 ++ .../BRP/DefaultFur.lilblock.meta | 7 + .../BRP/DefaultFurTwoPass.lilblock | 384 +++ .../BRP/DefaultFurTwoPass.lilblock.meta | 7 + .../BRP/DefaultGem.lilblock | 179 ++ .../BRP/DefaultGem.lilblock.meta | 7 + .../BRP/DefaultLite.lilblock | 326 +++ .../BRP/DefaultLite.lilblock.meta | 7 + .../BRP/DefaultLiteTwoSide.lilblock | 374 +++ .../BRP/DefaultLiteTwoSide.lilblock.meta | 7 + .../BRP/DefaultMulti.lilblock | 314 +++ .../BRP/DefaultMulti.lilblock.meta | 7 + .../BRP/DefaultMultiFur.lilblock | 417 +++ .../BRP/DefaultMultiFur.lilblock.meta | 7 + .../BRP/DefaultMultiGem.lilblock | 230 ++ .../BRP/DefaultMultiGem.lilblock.meta | 7 + .../BRP/DefaultMultiOutline.lilblock | 448 ++++ .../BRP/DefaultMultiOutline.lilblock.meta | 7 + .../BRP/DefaultMultiRefraction.lilblock | 297 +++ .../BRP/DefaultMultiRefraction.lilblock.meta | 7 + .../BRP/DefaultRefraction.lilblock | 191 ++ .../BRP/DefaultRefraction.lilblock.meta | 7 + .../BRP/DefaultRefractionBlur.lilblock | 236 ++ .../BRP/DefaultRefractionBlur.lilblock.meta | 7 + .../BRP/DefaultTessellation.lilblock | 341 +++ .../BRP/DefaultTessellation.lilblock.meta | 7 + .../BRP/DefaultTessellationTwoSide.lilblock | 394 +++ .../DefaultTessellationTwoSide.lilblock.meta | 7 + .../BRP/DefaultTwoSide.lilblock | 375 +++ .../BRP/DefaultTwoSide.lilblock.meta | 7 + .../BRP/DefaultUsePass.lilblock | 11 + .../BRP/DefaultUsePass.lilblock.meta | 7 + .../BRP/DefaultUsePassFurOnly.lilblock | 9 + .../BRP/DefaultUsePassFurOnly.lilblock.meta | 7 + .../BRP/DefaultUsePassFurOnlyTwoPass.lilblock | 11 + ...DefaultUsePassFurOnlyTwoPass.lilblock.meta | 7 + .../BRP/DefaultUsePassNoForwardAdd.lilblock | 10 + .../DefaultUsePassNoForwardAdd.lilblock.meta | 7 + .../DefaultUsePassNoForwardAddTwo.lilblock | 12 + ...efaultUsePassNoForwardAddTwo.lilblock.meta | 7 + .../BRP/DefaultUsePassOutline.lilblock | 13 + .../BRP/DefaultUsePassOutline.lilblock.meta | 7 + ...DefaultUsePassOutlineNoForwardAdd.lilblock | 11 + ...ltUsePassOutlineNoForwardAdd.lilblock.meta | 7 + ...aultUsePassOutlineNoForwardAddTwo.lilblock | 14 + ...sePassOutlineNoForwardAddTwo.lilblock.meta | 7 + .../BRP/DefaultUsePassOutlineOnly.lilblock | 9 + .../DefaultUsePassOutlineOnly.lilblock.meta | 7 + .../BRP/DefaultUsePassOverlay.lilblock | 9 + .../BRP/DefaultUsePassOverlay.lilblock.meta | 7 + ...DefaultUsePassOverlayNoForwardAdd.lilblock | 8 + ...ltUsePassOverlayNoForwardAdd.lilblock.meta | 7 + .../lilToon/CustomShaderResources/HDRP.meta | 8 + .../HDRP/Default.lilblock | 426 +++ .../HDRP/Default.lilblock.meta | 7 + .../HDRP/DefaultFakeShadow.lilblock | 70 + .../HDRP/DefaultFakeShadow.lilblock.meta | 7 + .../HDRP/DefaultFur.lilblock | 261 ++ .../HDRP/DefaultFur.lilblock.meta | 7 + .../HDRP/DefaultFurTwoPass.lilblock | 307 +++ .../HDRP/DefaultFurTwoPass.lilblock.meta | 7 + .../HDRP/DefaultGem.lilblock | 252 ++ .../HDRP/DefaultGem.lilblock.meta | 7 + .../HDRP/DefaultLite.lilblock | 342 +++ .../HDRP/DefaultLite.lilblock.meta | 7 + .../HDRP/DefaultLiteTwoSide.lilblock | 387 +++ .../HDRP/DefaultLiteTwoSide.lilblock.meta | 7 + .../HDRP/DefaultMulti.lilblock | 332 +++ .../HDRP/DefaultMulti.lilblock.meta | 7 + .../HDRP/DefaultMultiFur.lilblock | 379 +++ .../HDRP/DefaultMultiFur.lilblock.meta | 7 + .../HDRP/DefaultMultiGem.lilblock | 318 +++ .../HDRP/DefaultMultiGem.lilblock.meta | 7 + .../HDRP/DefaultMultiOutline.lilblock | 397 +++ .../HDRP/DefaultMultiOutline.lilblock.meta | 7 + .../HDRP/DefaultMultiRefraction.lilblock | 302 +++ .../HDRP/DefaultMultiRefraction.lilblock.meta | 7 + .../HDRP/DefaultRefraction.lilblock | 206 ++ .../HDRP/DefaultRefraction.lilblock.meta | 7 + .../HDRP/DefaultRefractionBlur.lilblock | 209 ++ .../HDRP/DefaultRefractionBlur.lilblock.meta | 7 + .../HDRP/DefaultTessellation.lilblock | 361 +++ .../HDRP/DefaultTessellation.lilblock.meta | 7 + .../HDRP/DefaultTessellationTwoSide.lilblock | 410 +++ .../DefaultTessellationTwoSide.lilblock.meta | 7 + .../HDRP/DefaultTwoSide.lilblock | 472 ++++ .../HDRP/DefaultTwoSide.lilblock.meta | 7 + .../HDRP/DefaultUsePass.lilblock | 12 + .../HDRP/DefaultUsePass.lilblock.meta | 7 + .../HDRP/DefaultUsePassFurOnly.lilblock | 8 + .../HDRP/DefaultUsePassFurOnly.lilblock.meta | 7 + .../DefaultUsePassFurOnlyTwoPass.lilblock | 9 + ...DefaultUsePassFurOnlyTwoPass.lilblock.meta | 7 + .../HDRP/DefaultUsePassOutline.lilblock | 13 + .../HDRP/DefaultUsePassOutline.lilblock.meta | 7 + .../HDRP/DefaultUsePassOutlineOnly.lilblock | 10 + .../DefaultUsePassOutlineOnly.lilblock.meta | 7 + .../DefaultUsePassOutlineTwoSide.lilblock | 14 + ...DefaultUsePassOutlineTwoSide.lilblock.meta | 7 + .../HDRP/DefaultUsePassOverlay.lilblock | 8 + .../HDRP/DefaultUsePassOverlay.lilblock.meta | 7 + .../HDRP/DefaultUsePassTwoSide.lilblock | 13 + .../HDRP/DefaultUsePassTwoSide.lilblock.meta | 7 + .../lilToon/CustomShaderResources/LWRP.meta | 8 + .../LWRP/Default.lilblock | 248 ++ .../LWRP/Default.lilblock.meta | 7 + .../LWRP/DefaultFakeShadow.lilblock | 73 + .../LWRP/DefaultFakeShadow.lilblock.meta | 7 + .../LWRP/DefaultFur.lilblock | 250 ++ .../LWRP/DefaultFur.lilblock.meta | 7 + .../LWRP/DefaultGem.lilblock | 245 ++ .../LWRP/DefaultGem.lilblock.meta | 7 + .../LWRP/DefaultLite.lilblock | 248 ++ .../LWRP/DefaultLite.lilblock.meta | 7 + .../LWRP/DefaultMulti.lilblock | 307 +++ .../LWRP/DefaultMulti.lilblock.meta | 7 + .../LWRP/DefaultMultiFur.lilblock | 356 +++ .../LWRP/DefaultMultiFur.lilblock.meta | 7 + .../LWRP/DefaultMultiGem.lilblock | 301 +++ .../LWRP/DefaultMultiGem.lilblock.meta | 7 + .../LWRP/DefaultMultiOutline.lilblock | 373 +++ .../LWRP/DefaultMultiOutline.lilblock.meta | 7 + .../LWRP/DefaultMultiRefraction.lilblock | 281 ++ .../LWRP/DefaultMultiRefraction.lilblock.meta | 7 + .../LWRP/DefaultRefraction.lilblock | 200 ++ .../LWRP/DefaultRefraction.lilblock.meta | 7 + .../LWRP/DefaultRefractionBlur.lilblock | 196 ++ .../LWRP/DefaultRefractionBlur.lilblock.meta | 7 + .../LWRP/DefaultTessellation.lilblock | 256 ++ .../LWRP/DefaultTessellation.lilblock.meta | 7 + .../LWRP/DefaultUsePass.lilblock | 12 + .../LWRP/DefaultUsePass.lilblock.meta | 7 + .../LWRP/DefaultUsePassFurOnly.lilblock | 8 + .../LWRP/DefaultUsePassFurOnly.lilblock.meta | 7 + .../LWRP/DefaultUsePassOutline.lilblock | 13 + .../LWRP/DefaultUsePassOutline.lilblock.meta | 7 + .../LWRP/DefaultUsePassOutlineOnly.lilblock | 8 + .../DefaultUsePassOutlineOnly.lilblock.meta | 7 + .../LWRP/DefaultUsePassOverlay.lilblock | 8 + .../LWRP/DefaultUsePassOverlay.lilblock.meta | 7 + .../lilToon/CustomShaderResources/Misc.meta | 8 + .../Misc/ReferenceUVs.lilblock | 70 + .../Misc/ReferenceUVs.lilblock.meta | 7 + .../CustomShaderResources/Properties.meta | 8 + .../Properties/Default.lilblock | 602 +++++ .../Properties/Default.lilblock.meta | 7 + .../Properties/DefaultAll.lilblock | 729 +++++ .../Properties/DefaultAll.lilblock.meta | 7 + .../Properties/DefaultCutout.lilblock | 60 + .../Properties/DefaultCutout.lilblock.meta | 7 + .../Properties/DefaultFakeShadow.lilblock | 84 + .../DefaultFakeShadow.lilblock.meta | 7 + .../Properties/DefaultFurCutout.lilblock | 81 + .../Properties/DefaultFurCutout.lilblock.meta | 7 + .../Properties/DefaultFurTransparent.lilblock | 81 + .../DefaultFurTransparent.lilblock.meta | 7 + .../Properties/DefaultGem.lilblock | 44 + .../Properties/DefaultGem.lilblock.meta | 7 + .../Properties/DefaultLite.lilblock | 86 + .../Properties/DefaultLite.lilblock.meta | 7 + .../Properties/DefaultOpaque.lilblock | 60 + .../Properties/DefaultOpaque.lilblock.meta | 7 + .../Properties/DefaultRefraction.lilblock | 37 + .../DefaultRefraction.lilblock.meta | 7 + .../Properties/DefaultTransparent.lilblock | 93 + .../DefaultTransparent.lilblock.meta | 7 + .../lilToon/CustomShaderResources/URP.meta | 8 + .../URP/Default.lilblock | 344 +++ .../URP/Default.lilblock.meta | 7 + .../URP/DefaultFakeShadow.lilblock | 73 + .../URP/DefaultFakeShadow.lilblock.meta | 7 + .../URP/DefaultFur.lilblock | 345 +++ .../URP/DefaultFur.lilblock.meta | 7 + .../URP/DefaultFurTwoPass.lilblock | 394 +++ .../URP/DefaultFurTwoPass.lilblock.meta | 7 + .../URP/DefaultGem.lilblock | 340 +++ .../URP/DefaultGem.lilblock.meta | 7 + .../URP/DefaultLite.lilblock | 345 +++ .../URP/DefaultLite.lilblock.meta | 7 + .../URP/DefaultLiteTwoSide.lilblock | 393 +++ .../URP/DefaultLiteTwoSide.lilblock.meta | 7 + .../URP/DefaultMulti.lilblock | 425 +++ .../URP/DefaultMulti.lilblock.meta | 7 + .../URP/DefaultMultiFur.lilblock | 469 ++++ .../URP/DefaultMultiFur.lilblock.meta | 7 + .../URP/DefaultMultiGem.lilblock | 411 +++ .../URP/DefaultMultiGem.lilblock.meta | 7 + .../URP/DefaultMultiOutline.lilblock | 491 ++++ .../URP/DefaultMultiOutline.lilblock.meta | 7 + .../URP/DefaultMultiRefraction.lilblock | 389 +++ .../URP/DefaultMultiRefraction.lilblock.meta | 7 + .../URP/DefaultRefraction.lilblock | 295 +++ .../URP/DefaultRefraction.lilblock.meta | 7 + .../URP/DefaultRefractionBlur.lilblock | 290 ++ .../URP/DefaultRefractionBlur.lilblock.meta | 7 + .../URP/DefaultTessellation.lilblock | 352 +++ .../URP/DefaultTessellation.lilblock.meta | 7 + .../URP/DefaultTessellationTwoSide.lilblock | 404 +++ .../DefaultTessellationTwoSide.lilblock.meta | 7 + .../URP/DefaultTwoSide.lilblock | 393 +++ .../URP/DefaultTwoSide.lilblock.meta | 7 + .../URP/DefaultUsePass.lilblock | 14 + .../URP/DefaultUsePass.lilblock.meta | 7 + .../URP/DefaultUsePassFurOnly.lilblock | 8 + .../URP/DefaultUsePassFurOnly.lilblock.meta | 7 + .../URP/DefaultUsePassFurOnlyTwoPass.lilblock | 9 + ...DefaultUsePassFurOnlyTwoPass.lilblock.meta | 7 + .../URP/DefaultUsePassOutline.lilblock | 15 + .../URP/DefaultUsePassOutline.lilblock.meta | 7 + .../URP/DefaultUsePassOutlineOnly.lilblock | 8 + .../DefaultUsePassOutlineOnly.lilblock.meta | 7 + .../URP/DefaultUsePassOutlineTwoSide.lilblock | 16 + ...DefaultUsePassOutlineTwoSide.lilblock.meta | 7 + .../URP/DefaultUsePassOverlay.lilblock | 8 + .../URP/DefaultUsePassOverlay.lilblock.meta | 7 + .../URP/DefaultUsePassTwoSide.lilblock | 15 + .../URP/DefaultUsePassTwoSide.lilblock.meta | 7 + Assets/External/lilToon/Editor.meta | 8 + Assets/External/lilToon/Editor/CurrentRP.txt | 3 + .../lilToon/Editor/CurrentRP.txt.meta | 7 + Assets/External/lilToon/Editor/Resources.meta | 8 + .../Editor/Resources/gui_box_inner_dark.png | 3 + .../Resources/gui_box_inner_dark.png.meta | 122 + .../Resources/gui_box_inner_half_dark.png | 3 + .../gui_box_inner_half_dark.png.meta | 122 + .../Resources/gui_box_inner_half_light.png | 3 + .../gui_box_inner_half_light.png.meta | 122 + .../Editor/Resources/gui_box_inner_light.png | 3 + .../Resources/gui_box_inner_light.png.meta | 122 + .../Editor/Resources/gui_box_outer_dark.png | 3 + .../Resources/gui_box_outer_dark.png.meta | 122 + .../Editor/Resources/gui_box_outer_light.png | 3 + .../Resources/gui_box_outer_light.png.meta | 122 + .../Editor/Resources/gui_custom_box_dark.png | 3 + .../Resources/gui_custom_box_dark.png.meta | 122 + .../Editor/Resources/gui_custom_box_light.png | 3 + .../Resources/gui_custom_box_light.png.meta | 122 + .../lilToon/Editor/Resources/lang.txt | 3 + .../lilToon/Editor/Resources/lang.txt.meta | 7 + .../External/lilToon/Editor/assembly-info.cs | 2 + .../lilToon/Editor/assembly-info.cs.meta | 11 + Assets/External/lilToon/Editor/csc.rsp | 2 + Assets/External/lilToon/Editor/csc.rsp.meta | 7 + .../External/lilToon/Editor/lilConstants.cs | 29 + .../lilToon/Editor/lilConstants.cs.meta | 11 + .../lilToon/Editor/lilDirectoryManager.cs | 81 + .../Editor/lilDirectoryManager.cs.meta | 11 + .../External/lilToon/Editor/lilEditorGUI.cs | 997 +++++++ .../lilToon/Editor/lilEditorGUI.cs.meta | 11 + .../lilToon/Editor/lilEditorParameters.cs | 14 + .../Editor/lilEditorParameters.cs.meta | 11 + .../External/lilToon/Editor/lilEnumeration.cs | 99 + .../lilToon/Editor/lilEnumeration.cs.meta | 11 + .../External/lilToon/Editor/lilInspector.meta | 8 + .../lilInspector/lilEditorTextureBaker.cs | 761 ++++++ .../lilEditorTextureBaker.cs.meta | 11 + .../Editor/lilInspector/lilEditorVariables.cs | 215 ++ .../lilInspector/lilEditorVariables.cs.meta | 11 + .../Editor/lilInspector/lilGUIUtility.cs | 397 +++ .../Editor/lilInspector/lilGUIUtility.cs.meta | 11 + .../Editor/lilInspector/lilInspector.cs | 206 ++ .../Editor/lilInspector/lilInspector.cs.meta | 11 + .../lilInspector/lilInspectorObsoletes.cs | 250 ++ .../lilInspectorObsoletes.cs.meta | 11 + .../lilInspector/lilMainInspectorGUI.cs | 1910 ++++++++++++++ .../lilInspector/lilMainInspectorGUI.cs.meta | 11 + .../lilInspector/lilMaterialConvertUtility.cs | 457 ++++ .../lilMaterialConvertUtility.cs.meta | 11 + .../lilInspector/lilMaterialProperties.cs | 1351 ++++++++++ .../lilMaterialProperties.cs.meta | 11 + .../Editor/lilInspector/lilPropertyDrawers.cs | 190 ++ .../lilInspector/lilPropertyDrawers.cs.meta | 11 + .../lilPropertyGroupDrawerAdvancedSetting.cs | 368 +++ ...PropertyGroupDrawerAdvancedSetting.cs.meta | 11 + .../lilPropertyGroupDrawerBaseSetting.cs | 514 ++++ .../lilPropertyGroupDrawerBaseSetting.cs.meta | 11 + .../lilPropertyGroupDrawerColorSetting.cs | 343 +++ ...lilPropertyGroupDrawerColorSetting.cs.meta | 11 + ...roupDrawerNormalMapAndReflectionSetting.cs | 408 +++ ...rawerNormalMapAndReflectionSetting.cs.meta | 11 + .../lilInspector/lilSettingAndPresetGUI.cs | 219 ++ .../lilSettingAndPresetGUI.cs.meta | 11 + .../Editor/lilInspector/lilShaderVariables.cs | 82 + .../lilInspector/lilShaderVariables.cs.meta | 11 + .../lilToon/Editor/lilLanguageManager.cs | 261 ++ .../lilToon/Editor/lilLanguageManager.cs.meta | 11 + .../lilToon/Editor/lilMaterialProperty.cs | 129 + .../Editor/lilMaterialProperty.cs.meta | 11 + .../lilToon/Editor/lilMaterialUtils.cs | 729 +++++ .../lilToon/Editor/lilMaterialUtils.cs.meta | 11 + .../External/lilToon/Editor/lilOptimizer.cs | 366 +++ .../lilToon/Editor/lilOptimizer.cs.meta | 11 + .../lilToon/Editor/lilPropertyNameChecker.cs | 335 +++ .../Editor/lilPropertyNameChecker.cs.meta | 11 + .../lilToon/Editor/lilRenderPipelineReader.cs | 150 ++ .../Editor/lilRenderPipelineReader.cs.meta | 11 + .../lilToon/Editor/lilSemVerParser.cs | 132 + .../lilToon/Editor/lilSemVerParser.cs.meta | 11 + .../External/lilToon/Editor/lilShaderAPI.cs | 32 + .../lilToon/Editor/lilShaderAPI.cs.meta | 11 + .../Editor/lilShaderContainerImporter.cs | 1654 ++++++++++++ .../Editor/lilShaderContainerImporter.cs.meta | 11 + .../lilToon/Editor/lilShaderManager.cs | 159 ++ .../lilToon/Editor/lilShaderManager.cs.meta | 11 + Assets/External/lilToon/Editor/lilStartup.cs | 343 +++ .../lilToon/Editor/lilStartup.cs.meta | 11 + .../lilToon/Editor/lilTextureUtils.cs | 441 ++++ .../lilToon/Editor/lilTextureUtils.cs.meta | 11 + .../lilToon/Editor/lilToon.Editor.asmdef | 28 + .../lilToon/Editor/lilToon.Editor.asmdef.meta | 7 + .../Editor/lilToonAssetPostprocessor.cs | 27 + .../Editor/lilToonAssetPostprocessor.cs.meta | 11 + .../lilToon/Editor/lilToonEditorUtils.cs | 761 ++++++ .../lilToon/Editor/lilToonEditorUtils.cs.meta | 11 + .../External/lilToon/Editor/lilToonPreset.cs | 551 ++++ .../lilToon/Editor/lilToonPreset.cs.meta | 11 + .../lilToon/Editor/lilToonPropertyDrawer.cs | 1111 ++++++++ .../Editor/lilToonPropertyDrawer.cs.meta | 11 + .../External/lilToon/Editor/lilToonSetting.cs | 1558 +++++++++++ .../lilToon/Editor/lilToonSetting.cs.meta | 11 + Assets/External/lilToon/External.meta | 8 + Assets/External/lilToon/External/Editor.meta | 8 + .../External/Editor/ChilloutVRModule.cs | 174 ++ .../External/Editor/ChilloutVRModule.cs.meta | 11 + .../lilToon/External/Editor/VRChatModule.cs | 190 ++ .../External/Editor/VRChatModule.cs.meta | 11 + .../Editor/lilToon.Editor.External.asmdef | 34 + .../lilToon.Editor.External.asmdef.meta | 7 + Assets/External/lilToon/LICENSE | 21 + Assets/External/lilToon/LICENSE.meta | 7 + Assets/External/lilToon/Prefabs.meta | 8 + .../Prefabs/FurCollider (range=x.xx22).prefab | 3 + .../FurCollider (range=x.xx22).prefab.meta | 7 + Assets/External/lilToon/Presets.meta | 8 + .../lilToon/Presets/Cloth-Anime.asset | 3 + .../lilToon/Presets/Cloth-Anime.asset.meta | 8 + .../lilToon/Presets/Cloth-Illust.asset | 3 + .../lilToon/Presets/Cloth-Illust.asset.meta | 8 + .../lilToon/Presets/Cloth-Outline.asset | 3 + .../lilToon/Presets/Cloth-Outline.asset.meta | 8 + .../lilToon/Presets/Cloth-Standard.asset | 3 + .../lilToon/Presets/Cloth-Standard.asset.meta | 8 + .../External/lilToon/Presets/Hair-Anime.asset | 3 + .../lilToon/Presets/Hair-Anime.asset.meta | 8 + .../lilToon/Presets/Hair-Illust.asset | 3 + .../lilToon/Presets/Hair-Illust.asset.meta | 8 + .../lilToon/Presets/Hair-Outline.asset | 3 + .../lilToon/Presets/Hair-Outline.asset.meta | 8 + .../Presets/Hair-OutlineRimLight.asset | 3 + .../Presets/Hair-OutlineRimLight.asset.meta | 8 + .../lilToon/Presets/Hair-Standard.asset | 3 + .../lilToon/Presets/Hair-Standard.asset.meta | 8 + .../lilToon/Presets/Inorganic-Glass.asset | 3 + .../Presets/Inorganic-Glass.asset.meta | 8 + .../lilToon/Presets/Inorganic-LiteGlass.asset | 3 + .../Presets/Inorganic-LiteGlass.asset.meta | 8 + .../Presets/Inorganic-Metal (MatCap).asset | 3 + .../Inorganic-Metal (MatCap).asset.meta | 8 + .../lilToon/Presets/Inorganic-Metal.asset | 3 + .../Presets/Inorganic-Metal.asset.meta | 8 + .../External/lilToon/Presets/Nature-Fur.asset | 3 + .../lilToon/Presets/Nature-Fur.asset.meta | 8 + .../External/lilToon/Presets/Skin-Anime.asset | 3 + .../lilToon/Presets/Skin-Anime.asset.meta | 8 + .../External/lilToon/Presets/Skin-Flat.asset | 3 + .../lilToon/Presets/Skin-Flat.asset.meta | 8 + .../lilToon/Presets/Skin-Illust.asset | 3 + .../lilToon/Presets/Skin-Illust.asset.meta | 8 + .../lilToon/Presets/Skin-Outline.asset | 3 + .../lilToon/Presets/Skin-Outline.asset.meta | 8 + .../lilToon/Presets/Skin-OutlineShadow.asset | 3 + .../Presets/Skin-OutlineShadow.asset.meta | 8 + Assets/External/lilToon/README.md | 3 + Assets/External/lilToon/README.md.meta | 7 + Assets/External/lilToon/README_JP.md | 3 + Assets/External/lilToon/README_JP.md.meta | 7 + Assets/External/lilToon/Shader.meta | 8 + Assets/External/lilToon/Shader/Includes.meta | 8 + .../Shader/Includes/GTModelDecode.cginc | 0 .../Shader/Includes/GTModelDecode.cginc.meta | 7 + .../lilToon/Shader/Includes/lil_common.hlsl | 217 ++ .../Shader/Includes/lil_common.hlsl.meta | 9 + .../Shader/Includes/lil_common_appdata.hlsl | 273 ++ .../Includes/lil_common_appdata.hlsl.meta | 10 + .../Shader/Includes/lil_common_frag.hlsl | 2078 +++++++++++++++ .../Shader/Includes/lil_common_frag.hlsl.meta | 10 + .../Includes/lil_common_frag_alpha.hlsl | 117 + .../Includes/lil_common_frag_alpha.hlsl.meta | 10 + .../Shader/Includes/lil_common_functions.hlsl | 1224 +++++++++ .../Includes/lil_common_functions.hlsl.meta | 9 + .../lil_common_functions_thirdparty.hlsl | 272 ++ .../lil_common_functions_thirdparty.hlsl.meta | 7 + .../Shader/Includes/lil_common_input.hlsl | 920 +++++++ .../Includes/lil_common_input.hlsl.meta | 9 + .../Includes/lil_common_input_base.hlsl | 808 ++++++ .../Includes/lil_common_input_base.hlsl.meta | 7 + .../Shader/Includes/lil_common_input_opt.hlsl | 808 ++++++ .../Includes/lil_common_input_opt.hlsl.meta | 7 + .../Shader/Includes/lil_common_macro.hlsl | 2338 +++++++++++++++++ .../Includes/lil_common_macro.hlsl.meta | 9 + .../Shader/Includes/lil_common_vert.hlsl | 516 ++++ .../Shader/Includes/lil_common_vert.hlsl.meta | 10 + .../Shader/Includes/lil_common_vert_fur.hlsl | 510 ++++ .../Includes/lil_common_vert_fur.hlsl.meta | 10 + .../lil_common_vert_fur_thirdparty.hlsl | 176 ++ .../lil_common_vert_fur_thirdparty.hlsl.meta | 7 + .../Includes/lil_pass_depthnormals.hlsl | 86 + .../Includes/lil_pass_depthnormals.hlsl.meta | 9 + .../Shader/Includes/lil_pass_depthonly.hlsl | 165 ++ .../Includes/lil_pass_depthonly.hlsl.meta | 9 + .../Shader/Includes/lil_pass_forward.hlsl | 10 + .../Includes/lil_pass_forward.hlsl.meta | 10 + .../Includes/lil_pass_forward_fakeshadow.hlsl | 87 + .../lil_pass_forward_fakeshadow.hlsl.meta | 10 + .../Shader/Includes/lil_pass_forward_fur.hlsl | 202 ++ .../Includes/lil_pass_forward_fur.hlsl.meta | 9 + .../Shader/Includes/lil_pass_forward_gem.hlsl | 313 +++ .../Includes/lil_pass_forward_gem.hlsl.meta | 10 + .../Includes/lil_pass_forward_lite.hlsl | 246 ++ .../Includes/lil_pass_forward_lite.hlsl.meta | 9 + .../Includes/lil_pass_forward_normal.hlsl | 581 ++++ .../lil_pass_forward_normal.hlsl.meta | 9 + .../Includes/lil_pass_forward_refblur.hlsl | 67 + .../lil_pass_forward_refblur.hlsl.meta | 9 + .../Shader/Includes/lil_pass_meta.hlsl | 104 + .../Shader/Includes/lil_pass_meta.hlsl.meta | 9 + .../Includes/lil_pass_motionvectors.hlsl | 177 ++ .../Includes/lil_pass_motionvectors.hlsl.meta | 10 + .../Includes/lil_pass_shadowcaster.hlsl | 72 + .../Includes/lil_pass_shadowcaster.hlsl.meta | 9 + .../Shader/Includes/lil_pass_universal2d.hlsl | 56 + .../Includes/lil_pass_universal2d.hlsl.meta | 9 + .../Shader/Includes/lil_pipeline_brp.hlsl | 14 + .../Includes/lil_pipeline_brp.hlsl.meta | 7 + .../Shader/Includes/lil_pipeline_hdrp.hlsl | 31 + .../Includes/lil_pipeline_hdrp.hlsl.meta | 7 + .../Shader/Includes/lil_pipeline_lwrp.hlsl | 6 + .../Includes/lil_pipeline_lwrp.hlsl.meta | 7 + .../Shader/Includes/lil_pipeline_urp.hlsl | 4 + .../Includes/lil_pipeline_urp.hlsl.meta | 7 + .../Shader/Includes/lil_replace_keywords.hlsl | 309 +++ .../Includes/lil_replace_keywords.hlsl.meta | 10 + .../Shader/Includes/lil_tessellation.hlsl | 148 ++ .../Includes/lil_tessellation.hlsl.meta | 9 + .../Shader/Includes/lil_vert_audiolink.hlsl | 61 + .../Includes/lil_vert_audiolink.hlsl.meta | 10 + .../Shader/Includes/lil_vert_encryption.hlsl | 31 + .../Includes/lil_vert_encryption.hlsl.meta | 10 + .../Shader/Includes/lil_vert_outline.hlsl | 29 + .../Includes/lil_vert_outline.hlsl.meta | 10 + .../lilToon/Shader/Includes/openlit_core.hlsl | 284 ++ .../Shader/Includes/openlit_core.hlsl.meta | 7 + Assets/External/lilToon/Shader/lts.shader | 753 ++++++ .../External/lilToon/Shader/lts.shader.meta | 9 + .../External/lilToon/Shader/lts_cutout.shader | 753 ++++++ .../lilToon/Shader/lts_cutout.shader.meta | 9 + .../lilToon/Shader/lts_cutout_o.shader | 754 ++++++ .../lilToon/Shader/lts_cutout_o.shader.meta | 9 + .../lilToon/Shader/lts_cutout_oo.shader | 747 ++++++ .../lilToon/Shader/lts_cutout_oo.shader.meta | 9 + .../lilToon/Shader/lts_fakeshadow.shader | 481 ++++ .../lilToon/Shader/lts_fakeshadow.shader.meta | 10 + Assets/External/lilToon/Shader/lts_fur.shader | 1663 ++++++++++++ .../lilToon/Shader/lts_fur.shader.meta | 22 + .../lilToon/Shader/lts_fur_cutout.shader | 1663 ++++++++++++ .../lilToon/Shader/lts_fur_cutout.shader.meta | 22 + .../lilToon/Shader/lts_fur_two.shader | 1796 +++++++++++++ .../lilToon/Shader/lts_fur_two.shader.meta | 22 + .../lilToon/Shader/lts_furonly.shader | 768 ++++++ .../lilToon/Shader/lts_furonly.shader.meta | 22 + .../lilToon/Shader/lts_furonly_cutout.shader | 768 ++++++ .../Shader/lts_furonly_cutout.shader.meta | 22 + .../lilToon/Shader/lts_furonly_two.shader | 769 ++++++ .../Shader/lts_furonly_two.shader.meta | 22 + Assets/External/lilToon/Shader/lts_gem.shader | 1580 +++++++++++ .../lilToon/Shader/lts_gem.shader.meta | 10 + Assets/External/lilToon/Shader/lts_o.shader | 754 ++++++ .../External/lilToon/Shader/lts_o.shader.meta | 9 + .../lilToon/Shader/lts_onetrans.shader | 786 ++++++ .../lilToon/Shader/lts_onetrans.shader.meta | 9 + .../lilToon/Shader/lts_onetrans_o.shader | 787 ++++++ .../lilToon/Shader/lts_onetrans_o.shader.meta | 9 + Assets/External/lilToon/Shader/lts_oo.shader | 747 ++++++ .../lilToon/Shader/lts_oo.shader.meta | 9 + .../lilToon/Shader/lts_overlay.shader | 780 ++++++ .../lilToon/Shader/lts_overlay.shader.meta | 9 + .../lilToon/Shader/lts_overlay_one.shader | 780 ++++++ .../Shader/lts_overlay_one.shader.meta | 9 + Assets/External/lilToon/Shader/lts_ref.shader | 1484 +++++++++++ .../lilToon/Shader/lts_ref.shader.meta | 9 + .../lilToon/Shader/lts_ref_blur.shader | 1486 +++++++++++ .../lilToon/Shader/lts_ref_blur.shader.meta | 9 + .../External/lilToon/Shader/lts_tess.shader | 753 ++++++ .../lilToon/Shader/lts_tess.shader.meta | 9 + .../lilToon/Shader/lts_tess_cutout.shader | 753 ++++++ .../Shader/lts_tess_cutout.shader.meta | 9 + .../lilToon/Shader/lts_tess_cutout_o.shader | 754 ++++++ .../Shader/lts_tess_cutout_o.shader.meta | 9 + .../External/lilToon/Shader/lts_tess_o.shader | 754 ++++++ .../lilToon/Shader/lts_tess_o.shader.meta | 9 + .../lilToon/Shader/lts_tess_onetrans.shader | 786 ++++++ .../Shader/lts_tess_onetrans.shader.meta | 9 + .../lilToon/Shader/lts_tess_onetrans_o.shader | 787 ++++++ .../Shader/lts_tess_onetrans_o.shader.meta | 9 + .../lilToon/Shader/lts_tess_trans.shader | 786 ++++++ .../lilToon/Shader/lts_tess_trans.shader.meta | 9 + .../lilToon/Shader/lts_tess_trans_o.shader | 787 ++++++ .../Shader/lts_tess_trans_o.shader.meta | 9 + .../lilToon/Shader/lts_tess_twotrans.shader | 787 ++++++ .../Shader/lts_tess_twotrans.shader.meta | 9 + .../lilToon/Shader/lts_tess_twotrans_o.shader | 788 ++++++ .../Shader/lts_tess_twotrans_o.shader.meta | 9 + .../External/lilToon/Shader/lts_trans.shader | 786 ++++++ .../lilToon/Shader/lts_trans.shader.meta | 9 + .../lilToon/Shader/lts_trans_o.shader | 787 ++++++ .../lilToon/Shader/lts_trans_o.shader.meta | 9 + .../lilToon/Shader/lts_trans_oo.shader | 780 ++++++ .../lilToon/Shader/lts_trans_oo.shader.meta | 9 + .../lilToon/Shader/lts_twotrans.shader | 787 ++++++ .../lilToon/Shader/lts_twotrans.shader.meta | 9 + .../lilToon/Shader/lts_twotrans_o.shader | 788 ++++++ .../lilToon/Shader/lts_twotrans_o.shader.meta | 9 + Assets/External/lilToon/Shader/ltsl.shader | 238 ++ .../External/lilToon/Shader/ltsl.shader.meta | 9 + .../lilToon/Shader/ltsl_cutout.shader | 238 ++ .../lilToon/Shader/ltsl_cutout.shader.meta | 9 + .../lilToon/Shader/ltsl_cutout_o.shader | 239 ++ .../lilToon/Shader/ltsl_cutout_o.shader.meta | 9 + Assets/External/lilToon/Shader/ltsl_o.shader | 239 ++ .../lilToon/Shader/ltsl_o.shader.meta | 9 + .../lilToon/Shader/ltsl_onetrans.shader | 271 ++ .../lilToon/Shader/ltsl_onetrans.shader.meta | 9 + .../lilToon/Shader/ltsl_onetrans_o.shader | 272 ++ .../Shader/ltsl_onetrans_o.shader.meta | 9 + .../lilToon/Shader/ltsl_overlay.shader | 265 ++ .../lilToon/Shader/ltsl_overlay.shader.meta | 9 + .../lilToon/Shader/ltsl_overlay_one.shader | 265 ++ .../Shader/ltsl_overlay_one.shader.meta | 9 + .../External/lilToon/Shader/ltsl_trans.shader | 271 ++ .../lilToon/Shader/ltsl_trans.shader.meta | 9 + .../lilToon/Shader/ltsl_trans_o.shader | 272 ++ .../lilToon/Shader/ltsl_trans_o.shader.meta | 9 + .../lilToon/Shader/ltsl_twotrans.shader | 272 ++ .../lilToon/Shader/ltsl_twotrans.shader.meta | 9 + .../lilToon/Shader/ltsl_twotrans_o.shader | 273 ++ .../Shader/ltsl_twotrans_o.shader.meta | 9 + .../External/lilToon/Shader/ltsmulti.shader | 1559 +++++++++++ .../lilToon/Shader/ltsmulti.shader.meta | 10 + .../lilToon/Shader/ltsmulti_fur.shader | 1703 ++++++++++++ .../lilToon/Shader/ltsmulti_fur.shader.meta | 22 + .../lilToon/Shader/ltsmulti_gem.shader | 1514 +++++++++++ .../lilToon/Shader/ltsmulti_gem.shader.meta | 10 + .../External/lilToon/Shader/ltsmulti_o.shader | 1726 ++++++++++++ .../lilToon/Shader/ltsmulti_o.shader.meta | 10 + .../lilToon/Shader/ltsmulti_ref.shader | 1464 +++++++++++ .../lilToon/Shader/ltsmulti_ref.shader.meta | 10 + .../lilToon/Shader/ltspass_baker.shader | 324 +++ .../lilToon/Shader/ltspass_baker.shader.meta | 9 + .../lilToon/Shader/ltspass_cutout.shader | 1634 ++++++++++++ .../lilToon/Shader/ltspass_cutout.shader.meta | 9 + .../lilToon/Shader/ltspass_dummy.shader | 26 + .../lilToon/Shader/ltspass_dummy.shader.meta | 10 + .../lilToon/Shader/ltspass_lite_cutout.shader | 920 +++++++ .../Shader/ltspass_lite_cutout.shader.meta | 9 + .../lilToon/Shader/ltspass_lite_opaque.shader | 920 +++++++ .../Shader/ltspass_lite_opaque.shader.meta | 9 + .../Shader/ltspass_lite_transparent.shader | 1084 ++++++++ .../ltspass_lite_transparent.shader.meta | 9 + .../lilToon/Shader/ltspass_opaque.shader | 1634 ++++++++++++ .../lilToon/Shader/ltspass_opaque.shader.meta | 9 + .../lilToon/Shader/ltspass_proponly.shader | 748 ++++++ .../Shader/ltspass_proponly.shader.meta | 10 + .../lilToon/Shader/ltspass_tess_cutout.shader | 1650 ++++++++++++ .../Shader/ltspass_tess_cutout.shader.meta | 9 + .../lilToon/Shader/ltspass_tess_opaque.shader | 1650 ++++++++++++ .../Shader/ltspass_tess_opaque.shader.meta | 9 + .../Shader/ltspass_tess_transparent.shader | 1820 +++++++++++++ .../ltspass_tess_transparent.shader.meta | 9 + .../lilToon/Shader/ltspass_transparent.shader | 1798 +++++++++++++ .../Shader/ltspass_transparent.shader.meta | 9 + Assets/External/lilToon/Texture.meta | 8 + .../lilToon/Texture/lil_bayer_16x16.png | 3 + .../lilToon/Texture/lil_bayer_16x16.png.meta | 123 + .../lilToon/Texture/lil_bayer_2x2.png | 3 + .../lilToon/Texture/lil_bayer_2x2.png.meta | 123 + .../lilToon/Texture/lil_bayer_4x4.png | 3 + .../lilToon/Texture/lil_bayer_4x4.png.meta | 123 + .../lilToon/Texture/lil_bayer_8x8.png | 3 + .../lilToon/Texture/lil_bayer_8x8.png.meta | 123 + .../lilToon/Texture/lil_emission_rainbow.png | 3 + .../Texture/lil_emission_rainbow.png.meta | 110 + .../External/lilToon/Texture/lil_noise_1d.png | 3 + .../lilToon/Texture/lil_noise_1d.png.meta | 110 + .../lilToon/Texture/lil_noise_fur.png | 3 + .../lilToon/Texture/lil_noise_fur.png.meta | 134 + .../lilToon/Texture/lil_noise_fur_2.png | 3 + .../lilToon/Texture/lil_noise_fur_2.png.meta | 122 + .../lilToon/Texture/lil_shape_hex.png | 3 + .../lilToon/Texture/lil_shape_hex.png.meta | 146 + .../lilToon/Texture/lil_shape_snowflakes.png | 3 + .../Texture/lil_shape_snowflakes.png.meta | 134 + .../lilToon/Texture/lil_shape_star.png | 3 + .../lilToon/Texture/lil_shape_star.png.meta | 146 + .../External/lilToon/Texture/lil_tangent.png | 3 + .../lilToon/Texture/lil_tangent.png.meta | 180 ++ .../lilToon/Texture/lil_tangent_circular.png | 3 + .../Texture/lil_tangent_circular.png.meta | 134 + .../Texture/matcap_metal_realistic.png | 3 + .../Texture/matcap_metal_realistic.png.meta | 134 + .../External/lilToon/Third Party Notices.md | 3 + .../lilToon/Third Party Notices.md.meta | 7 + Assets/External/lilToon/package.json | 3 + Assets/External/lilToon/package.json.meta | 7 + Assets/Scenes/Development scene.unity | 4 +- 754 files changed, 118254 insertions(+), 2 deletions(-) create mode 100644 Assets/External/lilToon.meta create mode 100644 Assets/External/lilToon/BaseShaderResources.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock create mode 100644 Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal.meta create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal create mode 100644 Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal.meta create mode 100644 Assets/External/lilToon/CHANGELOG.md create mode 100644 Assets/External/lilToon/CHANGELOG.md.meta create mode 100644 Assets/External/lilToon/CHANGELOG_JP.md create mode 100644 Assets/External/lilToon/CHANGELOG_JP.md.meta create mode 100644 Assets/External/lilToon/CustomShaderResources.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Misc.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock.meta create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock create mode 100644 Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock.meta create mode 100644 Assets/External/lilToon/Editor.meta create mode 100644 Assets/External/lilToon/Editor/CurrentRP.txt create mode 100644 Assets/External/lilToon/Editor/CurrentRP.txt.meta create mode 100644 Assets/External/lilToon/Editor/Resources.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png create mode 100644 Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png.meta create mode 100644 Assets/External/lilToon/Editor/Resources/lang.txt create mode 100644 Assets/External/lilToon/Editor/Resources/lang.txt.meta create mode 100644 Assets/External/lilToon/Editor/assembly-info.cs create mode 100644 Assets/External/lilToon/Editor/assembly-info.cs.meta create mode 100644 Assets/External/lilToon/Editor/csc.rsp create mode 100644 Assets/External/lilToon/Editor/csc.rsp.meta create mode 100644 Assets/External/lilToon/Editor/lilConstants.cs create mode 100644 Assets/External/lilToon/Editor/lilConstants.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilDirectoryManager.cs create mode 100644 Assets/External/lilToon/Editor/lilDirectoryManager.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilEditorGUI.cs create mode 100644 Assets/External/lilToon/Editor/lilEditorGUI.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilEditorParameters.cs create mode 100644 Assets/External/lilToon/Editor/lilEditorParameters.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilEnumeration.cs create mode 100644 Assets/External/lilToon/Editor/lilEnumeration.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilInspector.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilInspector.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs create mode 100644 Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilLanguageManager.cs create mode 100644 Assets/External/lilToon/Editor/lilLanguageManager.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilMaterialProperty.cs create mode 100644 Assets/External/lilToon/Editor/lilMaterialProperty.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilMaterialUtils.cs create mode 100644 Assets/External/lilToon/Editor/lilMaterialUtils.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilOptimizer.cs create mode 100644 Assets/External/lilToon/Editor/lilOptimizer.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilPropertyNameChecker.cs create mode 100644 Assets/External/lilToon/Editor/lilPropertyNameChecker.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilRenderPipelineReader.cs create mode 100644 Assets/External/lilToon/Editor/lilRenderPipelineReader.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilSemVerParser.cs create mode 100644 Assets/External/lilToon/Editor/lilSemVerParser.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilShaderAPI.cs create mode 100644 Assets/External/lilToon/Editor/lilShaderAPI.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilShaderContainerImporter.cs create mode 100644 Assets/External/lilToon/Editor/lilShaderContainerImporter.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilShaderManager.cs create mode 100644 Assets/External/lilToon/Editor/lilShaderManager.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilStartup.cs create mode 100644 Assets/External/lilToon/Editor/lilStartup.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilTextureUtils.cs create mode 100644 Assets/External/lilToon/Editor/lilTextureUtils.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilToon.Editor.asmdef create mode 100644 Assets/External/lilToon/Editor/lilToon.Editor.asmdef.meta create mode 100644 Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs create mode 100644 Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilToonEditorUtils.cs create mode 100644 Assets/External/lilToon/Editor/lilToonEditorUtils.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilToonPreset.cs create mode 100644 Assets/External/lilToon/Editor/lilToonPreset.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs create mode 100644 Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs.meta create mode 100644 Assets/External/lilToon/Editor/lilToonSetting.cs create mode 100644 Assets/External/lilToon/Editor/lilToonSetting.cs.meta create mode 100644 Assets/External/lilToon/External.meta create mode 100644 Assets/External/lilToon/External/Editor.meta create mode 100644 Assets/External/lilToon/External/Editor/ChilloutVRModule.cs create mode 100644 Assets/External/lilToon/External/Editor/ChilloutVRModule.cs.meta create mode 100644 Assets/External/lilToon/External/Editor/VRChatModule.cs create mode 100644 Assets/External/lilToon/External/Editor/VRChatModule.cs.meta create mode 100644 Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef create mode 100644 Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef.meta create mode 100644 Assets/External/lilToon/LICENSE create mode 100644 Assets/External/lilToon/LICENSE.meta create mode 100644 Assets/External/lilToon/Prefabs.meta create mode 100644 Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab create mode 100644 Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab.meta create mode 100644 Assets/External/lilToon/Presets.meta create mode 100644 Assets/External/lilToon/Presets/Cloth-Anime.asset create mode 100644 Assets/External/lilToon/Presets/Cloth-Anime.asset.meta create mode 100644 Assets/External/lilToon/Presets/Cloth-Illust.asset create mode 100644 Assets/External/lilToon/Presets/Cloth-Illust.asset.meta create mode 100644 Assets/External/lilToon/Presets/Cloth-Outline.asset create mode 100644 Assets/External/lilToon/Presets/Cloth-Outline.asset.meta create mode 100644 Assets/External/lilToon/Presets/Cloth-Standard.asset create mode 100644 Assets/External/lilToon/Presets/Cloth-Standard.asset.meta create mode 100644 Assets/External/lilToon/Presets/Hair-Anime.asset create mode 100644 Assets/External/lilToon/Presets/Hair-Anime.asset.meta create mode 100644 Assets/External/lilToon/Presets/Hair-Illust.asset create mode 100644 Assets/External/lilToon/Presets/Hair-Illust.asset.meta create mode 100644 Assets/External/lilToon/Presets/Hair-Outline.asset create mode 100644 Assets/External/lilToon/Presets/Hair-Outline.asset.meta create mode 100644 Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset create mode 100644 Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset.meta create mode 100644 Assets/External/lilToon/Presets/Hair-Standard.asset create mode 100644 Assets/External/lilToon/Presets/Hair-Standard.asset.meta create mode 100644 Assets/External/lilToon/Presets/Inorganic-Glass.asset create mode 100644 Assets/External/lilToon/Presets/Inorganic-Glass.asset.meta create mode 100644 Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset create mode 100644 Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset.meta create mode 100644 Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset create mode 100644 Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset.meta create mode 100644 Assets/External/lilToon/Presets/Inorganic-Metal.asset create mode 100644 Assets/External/lilToon/Presets/Inorganic-Metal.asset.meta create mode 100644 Assets/External/lilToon/Presets/Nature-Fur.asset create mode 100644 Assets/External/lilToon/Presets/Nature-Fur.asset.meta create mode 100644 Assets/External/lilToon/Presets/Skin-Anime.asset create mode 100644 Assets/External/lilToon/Presets/Skin-Anime.asset.meta create mode 100644 Assets/External/lilToon/Presets/Skin-Flat.asset create mode 100644 Assets/External/lilToon/Presets/Skin-Flat.asset.meta create mode 100644 Assets/External/lilToon/Presets/Skin-Illust.asset create mode 100644 Assets/External/lilToon/Presets/Skin-Illust.asset.meta create mode 100644 Assets/External/lilToon/Presets/Skin-Outline.asset create mode 100644 Assets/External/lilToon/Presets/Skin-Outline.asset.meta create mode 100644 Assets/External/lilToon/Presets/Skin-OutlineShadow.asset create mode 100644 Assets/External/lilToon/Presets/Skin-OutlineShadow.asset.meta create mode 100644 Assets/External/lilToon/README.md create mode 100644 Assets/External/lilToon/README.md.meta create mode 100644 Assets/External/lilToon/README_JP.md create mode 100644 Assets/External/lilToon/README_JP.md.meta create mode 100644 Assets/External/lilToon/Shader.meta create mode 100644 Assets/External/lilToon/Shader/Includes.meta create mode 100644 Assets/External/lilToon/Shader/Includes/GTModelDecode.cginc create mode 100644 Assets/External/lilToon/Shader/Includes/GTModelDecode.cginc.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/Includes/openlit_core.hlsl create mode 100644 Assets/External/lilToon/Shader/Includes/openlit_core.hlsl.meta create mode 100644 Assets/External/lilToon/Shader/lts.shader create mode 100644 Assets/External/lilToon/Shader/lts.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_cutout.shader create mode 100644 Assets/External/lilToon/Shader/lts_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_cutout_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_cutout_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_cutout_oo.shader create mode 100644 Assets/External/lilToon/Shader/lts_cutout_oo.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_fakeshadow.shader create mode 100644 Assets/External/lilToon/Shader/lts_fakeshadow.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_fur.shader create mode 100644 Assets/External/lilToon/Shader/lts_fur.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_fur_cutout.shader create mode 100644 Assets/External/lilToon/Shader/lts_fur_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_fur_two.shader create mode 100644 Assets/External/lilToon/Shader/lts_fur_two.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_furonly.shader create mode 100644 Assets/External/lilToon/Shader/lts_furonly.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_furonly_cutout.shader create mode 100644 Assets/External/lilToon/Shader/lts_furonly_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_furonly_two.shader create mode 100644 Assets/External/lilToon/Shader/lts_furonly_two.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_gem.shader create mode 100644 Assets/External/lilToon/Shader/lts_gem.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_onetrans.shader create mode 100644 Assets/External/lilToon/Shader/lts_onetrans.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_onetrans_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_onetrans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_oo.shader create mode 100644 Assets/External/lilToon/Shader/lts_oo.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_overlay.shader create mode 100644 Assets/External/lilToon/Shader/lts_overlay.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_overlay_one.shader create mode 100644 Assets/External/lilToon/Shader/lts_overlay_one.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_ref.shader create mode 100644 Assets/External/lilToon/Shader/lts_ref.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_ref_blur.shader create mode 100644 Assets/External/lilToon/Shader/lts_ref_blur.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_cutout.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_cutout_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_cutout_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_onetrans.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_onetrans.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_trans.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_trans.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_trans_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_trans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_twotrans.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_twotrans.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_trans.shader create mode 100644 Assets/External/lilToon/Shader/lts_trans.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_trans_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_trans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_trans_oo.shader create mode 100644 Assets/External/lilToon/Shader/lts_trans_oo.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_twotrans.shader create mode 100644 Assets/External/lilToon/Shader/lts_twotrans.shader.meta create mode 100644 Assets/External/lilToon/Shader/lts_twotrans_o.shader create mode 100644 Assets/External/lilToon/Shader/lts_twotrans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl.shader create mode 100644 Assets/External/lilToon/Shader/ltsl.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_cutout.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_cutout_o.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_cutout_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_o.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_onetrans.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_onetrans.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_onetrans_o.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_onetrans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_overlay.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_overlay.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_overlay_one.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_overlay_one.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_trans.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_trans.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_trans_o.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_trans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_twotrans.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_twotrans.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsl_twotrans_o.shader create mode 100644 Assets/External/lilToon/Shader/ltsl_twotrans_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsmulti.shader create mode 100644 Assets/External/lilToon/Shader/ltsmulti.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsmulti_fur.shader create mode 100644 Assets/External/lilToon/Shader/ltsmulti_fur.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsmulti_gem.shader create mode 100644 Assets/External/lilToon/Shader/ltsmulti_gem.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsmulti_o.shader create mode 100644 Assets/External/lilToon/Shader/ltsmulti_o.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltsmulti_ref.shader create mode 100644 Assets/External/lilToon/Shader/ltsmulti_ref.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_baker.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_baker.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_cutout.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_dummy.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_dummy.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_lite_cutout.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_lite_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_lite_opaque.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_lite_opaque.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_lite_transparent.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_lite_transparent.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_opaque.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_opaque.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_proponly.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_proponly.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_tess_cutout.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_tess_cutout.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_tess_opaque.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_tess_opaque.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_tess_transparent.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_tess_transparent.shader.meta create mode 100644 Assets/External/lilToon/Shader/ltspass_transparent.shader create mode 100644 Assets/External/lilToon/Shader/ltspass_transparent.shader.meta create mode 100644 Assets/External/lilToon/Texture.meta create mode 100644 Assets/External/lilToon/Texture/lil_bayer_16x16.png create mode 100644 Assets/External/lilToon/Texture/lil_bayer_16x16.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_bayer_2x2.png create mode 100644 Assets/External/lilToon/Texture/lil_bayer_2x2.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_bayer_4x4.png create mode 100644 Assets/External/lilToon/Texture/lil_bayer_4x4.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_bayer_8x8.png create mode 100644 Assets/External/lilToon/Texture/lil_bayer_8x8.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_emission_rainbow.png create mode 100644 Assets/External/lilToon/Texture/lil_emission_rainbow.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_noise_1d.png create mode 100644 Assets/External/lilToon/Texture/lil_noise_1d.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_noise_fur.png create mode 100644 Assets/External/lilToon/Texture/lil_noise_fur.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_noise_fur_2.png create mode 100644 Assets/External/lilToon/Texture/lil_noise_fur_2.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_shape_hex.png create mode 100644 Assets/External/lilToon/Texture/lil_shape_hex.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_shape_snowflakes.png create mode 100644 Assets/External/lilToon/Texture/lil_shape_snowflakes.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_shape_star.png create mode 100644 Assets/External/lilToon/Texture/lil_shape_star.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_tangent.png create mode 100644 Assets/External/lilToon/Texture/lil_tangent.png.meta create mode 100644 Assets/External/lilToon/Texture/lil_tangent_circular.png create mode 100644 Assets/External/lilToon/Texture/lil_tangent_circular.png.meta create mode 100644 Assets/External/lilToon/Texture/matcap_metal_realistic.png create mode 100644 Assets/External/lilToon/Texture/matcap_metal_realistic.png.meta create mode 100644 Assets/External/lilToon/Third Party Notices.md create mode 100644 Assets/External/lilToon/Third Party Notices.md.meta create mode 100644 Assets/External/lilToon/package.json create mode 100644 Assets/External/lilToon/package.json.meta diff --git a/Assets/External/lilToon.meta b/Assets/External/lilToon.meta new file mode 100644 index 00000000..a390b9a3 --- /dev/null +++ b/Assets/External/lilToon.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 64d5c1392c9bac842ad516cef3d16abe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources.meta b/Assets/External/lilToon/BaseShaderResources.meta new file mode 100644 index 00000000..e41e880f --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d465bb256af2e3a4ca646387f4bd83e7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock b/Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock new file mode 100644 index 00000000..25da1476 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock @@ -0,0 +1,2 @@ +ShaderName "" +EditorName "lilToon.lilToonInspector" \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock.meta b/Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock.meta new file mode 100644 index 00000000..6e09f201 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lilCustomShaderDatas.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c9dd6a844225d504fae29b983bf95995 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts.lilinternal new file mode 100644 index 00000000..febb5410 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts.lilinternal @@ -0,0 +1,17 @@ +Shader "lilToon" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + lilPassShaderName "Hidden/ltspass_opaque" + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts.lilinternal.meta new file mode 100644 index 00000000..1cdd4d78 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3c88ead8db0b5b845ae92ee1910fbf00 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal new file mode 100644 index 00000000..96ca9778 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonCutout" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultCutout" + } + + lilPassShaderName "Hidden/ltspass_cutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal.meta new file mode 100644 index 00000000..ac773ab6 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 392fb61d6aba2dd4fb79153e7174da5c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal new file mode 100644 index 00000000..05850875 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonCutoutOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultCutout" + } + + lilPassShaderName "Hidden/ltspass_cutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal.meta new file mode 100644 index 00000000..571eae2d --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_cutout_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4f60e4568bcdd044dbb93448634eea81 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal new file mode 100644 index 00000000..33da86ce --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonOutlineOnlyCutout" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultCutout" + } + + lilPassShaderName "Hidden/ltspass_cutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePassOutlineOnly" + lilSubShaderLWRP "DefaultUsePassOutlineOnly" + lilSubShaderURP "DefaultUsePassOutlineOnly" + lilSubShaderHDRP "DefaultUsePassOutlineOnly" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal.meta new file mode 100644 index 00000000..05337fc1 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_cutout_oo.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d704b852f3259b5449423441f859cabb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal new file mode 100644 index 00000000..91d1dcb1 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal @@ -0,0 +1,15 @@ +Shader "_lil/[Optional] lilToonFakeShadow" +{ + Properties + { + lilProperties "DefaultFakeShadow" + } + + lilSubShaderTags {"RenderType" = "Transparent" "Queue" = "AlphaTest+55"} + lilSubShaderBRP "DefaultFakeShadow" + lilSubShaderLWRP "DefaultFakeShadow" + lilSubShaderURP "DefaultFakeShadow" + lilSubShaderHDRP "DefaultFakeShadow" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal.meta new file mode 100644 index 00000000..4e697a80 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fakeshadow.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f898bd30ebd640a4ba0872d07d80ff75 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal new file mode 100644 index 00000000..974d94cc --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal @@ -0,0 +1,20 @@ +Shader "Hidden/lilToonFur" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultFurTransparent" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + lilSubShaderBRP "DefaultFur" + lilSubShaderLWRP "DefaultFur" + lilSubShaderURP "DefaultFur" + lilSubShaderHDRP "DefaultFur" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal.meta new file mode 100644 index 00000000..fb6491c8 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fur.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 338cdeed8228d524c9b3fafed3c1b84f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal new file mode 100644 index 00000000..bb0d63dd --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal @@ -0,0 +1,20 @@ +Shader "Hidden/lilToonFurCutout" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultFurCutout" + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultFur" + lilSubShaderLWRP "DefaultFur" + lilSubShaderURP "DefaultFur" + lilSubShaderHDRP "DefaultFur" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal.meta new file mode 100644 index 00000000..a23f4b37 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fur_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8fe0d6be8d8e5804295ce446ba35aa35 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal new file mode 100644 index 00000000..ebd0cdb6 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal @@ -0,0 +1,20 @@ +Shader "Hidden/lilToonFurTwoPass" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultFurTransparent" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + lilSubShaderBRP "DefaultFurTwoPass" + lilSubShaderLWRP "DefaultFur" + lilSubShaderURP "DefaultFurTwoPass" + lilSubShaderHDRP "DefaultFurTwoPass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal.meta new file mode 100644 index 00000000..8f5dcbba --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_fur_two.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f5fd23346ca8db143b4f4b6c4e568c08 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal new file mode 100644 index 00000000..c2777f13 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonFurOnlyTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultFurTransparent" + } + + lilPassShaderName "Hidden/lilToonFur" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + lilSubShaderBRP "DefaultUsePassFurOnly" + lilSubShaderLWRP "DefaultUsePassFurOnly" + lilSubShaderURP "DefaultUsePassFurOnly" + lilSubShaderHDRP "DefaultUsePassFurOnly" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal.meta new file mode 100644 index 00000000..15236439 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_furonly.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7e9b0eed12308db4ba34f32574c46112 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal new file mode 100644 index 00000000..a08ba179 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonFurOnlyCutout" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultFurCutout" + } + + lilPassShaderName "Hidden/lilToonFurCutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePassFurOnly" + lilSubShaderLWRP "DefaultUsePassFurOnly" + lilSubShaderURP "DefaultUsePassFurOnly" + lilSubShaderHDRP "DefaultUsePassFurOnly" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal.meta new file mode 100644 index 00000000..386d5ac4 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_furonly_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d778904dee5051c4b931dce1c80b8220 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal new file mode 100644 index 00000000..e644333b --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonFurOnlyTwoPass" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultFurTransparent" + } + + lilPassShaderName "Hidden/lilToonFurTwoPass" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + lilSubShaderBRP "DefaultUsePassFurOnlyTwoPass" + lilSubShaderLWRP "DefaultUsePassFurOnly" + lilSubShaderURP "DefaultUsePassFurOnlyTwoPass" + lilSubShaderHDRP "DefaultUsePassFurOnlyTwoPass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal.meta new file mode 100644 index 00000000..5e6b4ca9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_furonly_two.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f2cc57947e10f294cadbabde5caa2c4e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal new file mode 100644 index 00000000..b94bf8e9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal @@ -0,0 +1,20 @@ +Shader "Hidden/lilToonGem" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultGem" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + lilSubShaderBRP "DefaultGem" + lilSubShaderLWRP "DefaultGem" + lilSubShaderURP "DefaultGem" + lilSubShaderHDRP "DefaultGem" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal.meta new file mode 100644 index 00000000..1b145ab8 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_gem.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: adf2912223933c2418d6850f4f9eb94f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal new file mode 100644 index 00000000..688607f4 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + lilPassShaderName "Hidden/ltspass_opaque" + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal.meta new file mode 100644 index 00000000..f12870ee --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ab059f869afd76a4389ad759b7261bf8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal new file mode 100644 index 00000000..8611f610 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonOnePassTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassNoForwardAdd" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal.meta new file mode 100644 index 00000000..ebfb2a33 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_onetrans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6ff738bded7cc2c4d8422338aeb6e35c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal new file mode 100644 index 00000000..4e5dded9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonOnePassTransparentOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutlineNoForwardAdd" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal.meta new file mode 100644 index 00000000..f6e84eec --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_onetrans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e912cd31e0b254842a7555108479ed81 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal new file mode 100644 index 00000000..02d7eb37 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonOutlineOnly" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + lilPassShaderName "Hidden/ltspass_opaque" + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultUsePassOutlineOnly" + lilSubShaderLWRP "DefaultUsePassOutlineOnly" + lilSubShaderURP "DefaultUsePassOutlineOnly" + lilSubShaderHDRP "DefaultUsePassOutlineOnly" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal.meta new file mode 100644 index 00000000..be4cc3f6 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_oo.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a35cea713e0c698489216cb7a5df0166 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal new file mode 100644 index 00000000..90473db4 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonOverlay" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOverlay" + lilSubShaderLWRP "DefaultUsePassOverlay" + lilSubShaderURP "DefaultUsePassOverlay" + lilSubShaderHDRP "DefaultUsePassOverlay" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal.meta new file mode 100644 index 00000000..101ee3c5 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_overlay.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a7299c31f3470be45a8663933238bb47 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal new file mode 100644 index 00000000..bc652a43 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonOverlayOnePass" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOverlayNoForwardAdd" + lilSubShaderLWRP "DefaultUsePassOverlay" + lilSubShaderURP "DefaultUsePassOverlay" + lilSubShaderHDRP "DefaultUsePassOverlay" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal.meta new file mode 100644 index 00000000..187a4a7d --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_overlay_one.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8333b8dc9a16c7c43845eaf5ac57b317 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal new file mode 100644 index 00000000..79b9ec85 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal @@ -0,0 +1,20 @@ +Shader "Hidden/lilToonRefraction" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultRefraction" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + lilSubShaderBRP "DefaultRefraction" + lilSubShaderLWRP "DefaultRefraction" + lilSubShaderURP "DefaultRefraction" + lilSubShaderHDRP "DefaultRefraction" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal.meta new file mode 100644 index 00000000..a7e3e364 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_ref.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 466d488d091c32f4d8625a2ddca7c7ff +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal new file mode 100644 index 00000000..5329195c --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal @@ -0,0 +1,20 @@ +Shader "Hidden/lilToonRefractionBlur" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultRefraction" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + lilSubShaderBRP "DefaultRefractionBlur" + lilSubShaderLWRP "DefaultRefractionBlur" + lilSubShaderURP "DefaultRefractionBlur" + lilSubShaderHDRP "DefaultRefractionBlur" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal.meta new file mode 100644 index 00000000..0b4db331 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_ref_blur.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f685d4615cde46b4d9d96f5157be4055 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal new file mode 100644 index 00000000..585223a9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellation" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + lilPassShaderName "Hidden/ltspass_tess_opaque" + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal.meta new file mode 100644 index 00000000..7e8a4802 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b7a8a885af014a44481c3818f4030d89 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal new file mode 100644 index 00000000..3a03d073 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationCutout" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultCutout" + } + + lilPassShaderName "Hidden/ltspass_tess_cutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal.meta new file mode 100644 index 00000000..ed564e29 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ac4e5e5c11d34a04cabadc67071a64a4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal new file mode 100644 index 00000000..c006138e --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationCutoutOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultCutout" + } + + lilPassShaderName "Hidden/ltspass_tess_cutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal.meta new file mode 100644 index 00000000..f4a5205a --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_cutout_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 070de9f5c8b0a7c438d2c6d27722d0d3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal new file mode 100644 index 00000000..63e59ab8 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + lilPassShaderName "Hidden/ltspass_tess_opaque" + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal.meta new file mode 100644 index 00000000..09c5eb04 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f9343b99f16b8b9409498d7651d87bd7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal new file mode 100644 index 00000000..2d7aa786 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationOnePassTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_tess_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassNoForwardAdd" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal.meta new file mode 100644 index 00000000..0c06940e --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4df70d99bb9c0304db730aa2397c08de +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal new file mode 100644 index 00000000..51cd886c --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationOnePassTransparentOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_tess_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutlineNoForwardAdd" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal.meta new file mode 100644 index 00000000..089c725f --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_onetrans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c7909e3e79baae841be4e54bdd2c218d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal new file mode 100644 index 00000000..57c7cfe0 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_tess_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal.meta new file mode 100644 index 00000000..2905ba8d --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bb34dfe1e43a62348b5b5bb52770a7c6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal new file mode 100644 index 00000000..55bc2edb --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationTransparentOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_tess_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal.meta new file mode 100644 index 00000000..e67613d0 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_trans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 903ceed4d30b124419a8f723c6c9e813 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal new file mode 100644 index 00000000..56f51ec3 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationTwoPassTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_tess_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassNoForwardAddTwo" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePassTwoSide" + lilSubShaderHDRP "DefaultUsePassTwoSide" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal.meta new file mode 100644 index 00000000..582df7f9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f67e38458e2d61a429570fc6438b8cc4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal new file mode 100644 index 00000000..efb70cda --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_tess_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutlineNoForwardAddTwo" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutlineTwoSide" + lilSubShaderHDRP "DefaultUsePassOutlineTwoSide" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal.meta new file mode 100644 index 00000000..2262278a --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_tess_twotrans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eddba9570dbc40e43b0029cec3a1b8fc +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal new file mode 100644 index 00000000..13572978 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal.meta new file mode 100644 index 00000000..42384dab --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_trans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 87550f35c17d44843be41107c3d50296 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal new file mode 100644 index 00000000..bfa182f9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTransparentOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal.meta new file mode 100644 index 00000000..65d94289 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_trans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: afaa68d2de9c8064cafbaa9260fdd978 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal new file mode 100644 index 00000000..6bee8752 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonOutlineOnlyTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutlineOnly" + lilSubShaderLWRP "DefaultUsePassOutlineOnly" + lilSubShaderURP "DefaultUsePassOutlineOnly" + lilSubShaderHDRP "DefaultUsePassOutlineOnly" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal.meta new file mode 100644 index 00000000..3bd4762b --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_trans_oo.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 41759bb4b04a4654696a050e1cca5c44 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal new file mode 100644 index 00000000..1f6e43f7 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTwoPassTransparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassNoForwardAddTwo" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePassTwoSide" + lilSubShaderHDRP "DefaultUsePassTwoSide" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal.meta new file mode 100644 index 00000000..21a9d1e8 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_twotrans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6cae238c07a3aa34abcb79c058a52b22 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal new file mode 100644 index 00000000..ce78d623 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonTwoPassTransparentOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutlineNoForwardAddTwo" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutlineTwoSide" + lilSubShaderHDRP "DefaultUsePassOutlineTwoSide" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal.meta new file mode 100644 index 00000000..96b687a8 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/lts_twotrans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6f9d16c23608d0445945a1f443ebd87f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal new file mode 100644 index 00000000..8953651e --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLite" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultOpaque" + } + + lilPassShaderName "Hidden/ltspass_lite_opaque" + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal.meta new file mode 100644 index 00000000..4d8df818 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e54285d89347373438cab8fb9ecf495b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal new file mode 100644 index 00000000..71ed6f0a --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteCutout" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultCutout" + } + + lilPassShaderName "Hidden/ltspass_lite_cutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal.meta new file mode 100644 index 00000000..f72f7bc2 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0a32de5c81b815d449152e2e94757c11 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal new file mode 100644 index 00000000..cec557c4 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteCutoutOutline" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultCutout" + } + + lilPassShaderName "Hidden/ltspass_lite_cutout" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal.meta new file mode 100644 index 00000000..778ae3df --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_cutout_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d36cfa740ffabbf4eb218ebec025773f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal new file mode 100644 index 00000000..6646c024 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteOutline" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultOpaque" + } + + lilPassShaderName "Hidden/ltspass_lite_opaque" + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal.meta new file mode 100644 index 00000000..c1dbd499 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2ac10282a355aca4f95af2695bca6d38 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal new file mode 100644 index 00000000..04f76da7 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteOnePassTransparent" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassNoForwardAdd" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal.meta new file mode 100644 index 00000000..1bc7e21e --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c0a29f5180f108e4d84110f461c8b023 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal new file mode 100644 index 00000000..381c3c87 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteOnePassTransparentOutline" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutlineNoForwardAdd" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal.meta new file mode 100644 index 00000000..1d7c22d7 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_onetrans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ccefaa3102c672f409ee8d2f18d928f8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal new file mode 100644 index 00000000..e5110779 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonLiteOverlay" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOverlay" + lilSubShaderLWRP "DefaultUsePassOverlay" + lilSubShaderURP "DefaultUsePassOverlay" + lilSubShaderHDRP "DefaultUsePassOverlay" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal.meta new file mode 100644 index 00000000..867d64f8 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4e826208b1b5997408c6bd6966fc57a1 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal new file mode 100644 index 00000000..24a28218 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal @@ -0,0 +1,17 @@ +Shader "_lil/[Optional] lilToonLiteOverlayOnePass" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOverlayNoForwardAdd" + lilSubShaderLWRP "DefaultUsePassOverlay" + lilSubShaderURP "DefaultUsePassOverlay" + lilSubShaderHDRP "DefaultUsePassOverlay" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal.meta new file mode 100644 index 00000000..e290a193 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_overlay_one.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a1c3ee0332cd460469919db8bc57ab8d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal new file mode 100644 index 00000000..2f1bee74 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteTransparent" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePass" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePass" + lilSubShaderHDRP "DefaultUsePass" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal.meta new file mode 100644 index 00000000..16353290 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_trans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ee409fcd68cebe548a900885d6b04228 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal new file mode 100644 index 00000000..95f2cf55 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteTransparentOutline" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutline" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutline" + lilSubShaderHDRP "DefaultUsePassOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal.meta new file mode 100644 index 00000000..7d46af40 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_trans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9ff130fbfd11749429353d5cd9ad8d8e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal new file mode 100644 index 00000000..a5459db5 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteTwoPassTransparent" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassNoForwardAddTwo" + lilSubShaderLWRP "DefaultUsePass" + lilSubShaderURP "DefaultUsePassTwoSide" + lilSubShaderHDRP "DefaultUsePassTwoSide" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal.meta new file mode 100644 index 00000000..227506c2 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 910bd65957249754188b082cce77e90f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal new file mode 100644 index 00000000..702b5ce0 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/lilToonLiteTwoPassTransparentOutline" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + lilPassShaderName "Hidden/ltspass_lite_transparent" + lilSubShaderTags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + lilSubShaderBRP "DefaultUsePassOutlineNoForwardAddTwo" + lilSubShaderLWRP "DefaultUsePassOutline" + lilSubShaderURP "DefaultUsePassOutlineTwoSide" + lilSubShaderHDRP "DefaultUsePassOutlineTwoSide" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal.meta new file mode 100644 index 00000000..e1d1d85a --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsl_twotrans_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1993b568d943fd841a9d1022ae1ba501 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal new file mode 100644 index 00000000..2071a970 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal @@ -0,0 +1,16 @@ +Shader "_lil/lilToonMulti" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Geometry"} + lilSubShaderBRP "DefaultMulti" + lilSubShaderLWRP "DefaultMulti" + lilSubShaderURP "DefaultMulti" + lilSubShaderHDRP "DefaultMulti" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal.meta new file mode 100644 index 00000000..ce3631e5 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a975dab3b4ab6f346a1bc3119bf74963 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal new file mode 100644 index 00000000..41e8d853 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal @@ -0,0 +1,16 @@ +Shader "Hidden/lilToonMultiFur" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultFurTransparent" + } + + lilSubShaderTags {"RenderType" = "Transparent" "Queue" = "Transparent"} + lilSubShaderBRP "DefaultMultiFur" + lilSubShaderLWRP "DefaultMultiFur" + lilSubShaderURP "DefaultMultiFur" + lilSubShaderHDRP "DefaultMultiFur" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal.meta new file mode 100644 index 00000000..d27edd0a --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_fur.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bf37d9b55aed8a24e810be7498ec970c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal new file mode 100644 index 00000000..858d6e4a --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal @@ -0,0 +1,16 @@ +Shader "Hidden/lilToonMultiGem" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultGem" + } + + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + lilSubShaderBRP "DefaultMultiGem" + lilSubShaderLWRP "DefaultMultiGem" + lilSubShaderURP "DefaultMultiGem" + lilSubShaderHDRP "DefaultMultiGem" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal.meta new file mode 100644 index 00000000..8be9aca9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_gem.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 79abc181b18a2234f9a4d4c0e4489d74 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal new file mode 100644 index 00000000..605d39cd --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal @@ -0,0 +1,16 @@ +Shader "Hidden/lilToonMultiOutline" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + lilSubShaderBRP "DefaultMultiOutline" + lilSubShaderLWRP "DefaultMultiOutline" + lilSubShaderURP "DefaultMultiOutline" + lilSubShaderHDRP "DefaultMultiOutline" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal.meta new file mode 100644 index 00000000..2eb4727c --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_o.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d5f896e09b43d144cb7481869ab75b83 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal new file mode 100644 index 00000000..56efff78 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal @@ -0,0 +1,16 @@ +Shader "Hidden/lilToonMultiRefraction" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultRefraction" + } + + lilSubShaderTags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + lilSubShaderBRP "DefaultMultiRefraction" + lilSubShaderLWRP "DefaultMultiRefraction" + lilSubShaderURP "DefaultMultiRefraction" + lilSubShaderHDRP "DefaultMultiRefraction" + + CustomEditor "*LIL_EDITOR_NAME*" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal.meta new file mode 100644 index 00000000..f42d07eb --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltsmulti_ref.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a146987e6182fbd44b99e27a2ee88b0f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal new file mode 100644 index 00000000..cda82862 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal @@ -0,0 +1,222 @@ +Shader "Hidden/ltsother_baker" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] _Color ("Color", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("Hue|Saturation|Value|Gamma", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("Use Main 2nd", Int) = 0 + _Color2nd ("Color", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("Angle", Float) = 0 + [lilToggle] _Main2ndTexIsDecal ("As Decal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("As MSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("Use Main 3rd", Int) = 0 + _Color3rd ("Color", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("Angle", Float) = 0 + [lilToggle] _Main3rdTexIsDecal ("As Decal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("As MSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Texture Packing + [NoScaleOffset] _PackingTexture1 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture2 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture3 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture4 ("Texture", 2D) = "white" {} + _PackingChannel1 ("Channel", Int) = 0 + _PackingChannel2 ("Channel", Int) = 0 + _PackingChannel3 ("Channel", Int) = 0 + _PackingChannel4 ("Channel", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Texture3D + [NoScaleOffset] _MainTex3D ("Texture", 3D) = "white" {} + _ResX ("ResX", Int) = 16 + _ResY ("ResY", Int) = 1 + } + + SubShader + { + HLSLINCLUDE + *LIL_SHADER_SETTING* + ENDHLSL + + Pass + { + Cull Off + ZWrite Off + ZTest Always + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature _ _TRIMASK _ALPHAMASK _NORMAL_DXGL _TEXTURE_PACKING _LUT3D_TO_2D + + //------------------------------------------------------------------------------------------------------------------ + // Shader + #define LIL_BAKER + #define LIL_WITHOUT_ANIMATION + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + #include "Includes/lil_common_appdata.hlsl" + + TEXTURE2D(_PackingTexture1); + TEXTURE2D(_PackingTexture2); + TEXTURE2D(_PackingTexture3); + TEXTURE2D(_PackingTexture4); + TEXTURE3D(_MainTex3D); + uint _PackingChannel1; + uint _PackingChannel2; + uint _PackingChannel3; + uint _PackingChannel4; + uint _ResX; + uint _ResY; + + struct v2f + { + float4 positionCS : SV_POSITION; + float2 uv0 : TEXCOORD0; + float tangentW : TEXCOORD1; + }; + + v2f vert(appdata input) + { + v2f o; + LIL_VERTEX_POSITION_INPUTS(input.positionOS, vertexInput); + o.positionCS = vertexInput.positionCS; + o.uv0 = input.uv0; + o.tangentW = input.tangentOS.w; + return o; + } + + float4 frag(v2f input) : SV_Target + { + #if defined(_TRIMASK) + float4 col1 = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + float4 col2 = LIL_SAMPLE_2D(_Main2ndTex,sampler_Main2ndTex,input.uv0); + float4 col3 = LIL_SAMPLE_2D(_Main3rdTex,sampler_Main3rdTex,input.uv0); + float mat = lilGray(col1.rgb); + float rim = lilGray(col2.rgb); + float emi = lilGray(col3.rgb); + float4 col = float4(mat,rim,emi,1); + #elif defined(_ALPHAMASK) + float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + float alphaMask = LIL_SAMPLE_2D(_AlphaMask,sampler_MainTex,input.uv0).r; + alphaMask = saturate(alphaMask * _AlphaMaskScale + _AlphaMaskValue); + if(_AlphaMaskMode == 1) col.a = alphaMask; + if(_AlphaMaskMode == 2) col.a = col.a * alphaMask; + if(_AlphaMaskMode == 3) col.a = saturate(col.a + alphaMask); + if(_AlphaMaskMode == 4) col.a = saturate(col.a - alphaMask); + #elif defined(_NORMAL_DXGL) + float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + col.g = 1.0 - col.g; + #elif defined(_TEXTURE_PACKING) + float4 p1 = LIL_SAMPLE_2D(_PackingTexture1,lil_sampler_linear_clamp,input.uv0); + float4 p2 = LIL_SAMPLE_2D(_PackingTexture2,lil_sampler_linear_clamp,input.uv0); + float4 p3 = LIL_SAMPLE_2D(_PackingTexture3,lil_sampler_linear_clamp,input.uv0); + float4 p4 = LIL_SAMPLE_2D(_PackingTexture4,lil_sampler_linear_clamp,input.uv0); + float4 col = 1.0f; + if(_PackingChannel1 >= 4) { + col.r = dot(p1.rgb, 1.0/3.0); + } else { + col.r = p1[_PackingChannel1]; + } + if(_PackingChannel2 >= 4) { + col.g = dot(p2.rgb, 1.0/3.0); + } else { + col.g = p1[_PackingChannel2]; + } + if(_PackingChannel3 >= 4) { + col.b = dot(p3.rgb, 1.0/3.0); + } else { + col.b = p1[_PackingChannel3]; + } + if(_PackingChannel4 >= 4) { + col.a = dot(p4.rgb, 1.0/3.0); + } else { + col.a = p1[_PackingChannel4]; + } + #elif defined(_LUT3D_TO_2D) + float4 col; + float3 res = float3(_ResX, _ResY, _ResX * _ResY); + float3 resInv = rcp(float3(res.x, -res.y, res.z)); + float resMin = res.z - 1; + col.r = ((uint)input.positionCS.x % (uint)res.z) / resMin; + col.g = 1.0 - ((uint)input.positionCS.y % (uint)res.z) / resMin; + col.b = ((uint)input.positionCS.x / (uint)res.z) / resMin + ((_ResY - 1 - (uint)input.positionCS.y / (uint)res.z) / resMin * _ResX); + //col.rgb = (col.rgb - col.rgb * resInv.z) + 0.5 * resInv.z; + uint w,h,d,l; + _MainTex3D.GetDimensions(0,w,h,d,l); + col.rgb = (col.rgb - col.rgb / (float)w) + 0.5 / (float)w; + col.rgb = LIL_SAMPLE_3D(_MainTex3D, lil_sampler_linear_clamp, col.rgb).rgb; + col.a = 1; + #else + // Main + float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + float3 baseColor = col.rgb; + float colorAdjustMask = LIL_SAMPLE_2D(_MainColorAdjustMask, sampler_MainTex, input.uv0).r; + col.rgb = lilToneCorrection(col.rgb, _MainTexHSVG); + #if defined(LIL_FEATURE_MAIN_GRADATION_MAP) + col.rgb = lilGradationMap(col.rgb, _MainGradationTex, _MainGradationStrength); + #endif + col.rgb = lerp(baseColor, col.rgb, colorAdjustMask); + col *= _Color; + + bool isRightHand = input.tangentW > 0.0; + + // 2nd + UNITY_BRANCH + if(_UseMain2ndTex) + { + _Color2nd *= LIL_GET_SUBTEX(_Main2ndTex,input.uv0); + col.rgb = lilBlendColor(col.rgb, _Color2nd.rgb, LIL_SAMPLE_2D(_Main2ndBlendMask,sampler_MainTex,input.uv0).r * _Color2nd.a, _Main2ndTexBlendMode); + } + + // 3rd + UNITY_BRANCH + if(_UseMain3rdTex) + { + _Color3rd *= LIL_GET_SUBTEX(_Main3rdTex,input.uv0); + col.rgb = lilBlendColor(col.rgb, _Color3rd.rgb, LIL_SAMPLE_2D(_Main3rdBlendMask,sampler_MainTex,input.uv0).r * _Color3rd.a, _Main3rdTexBlendMode); + } + #endif + + return col; + } + ENDHLSL + } + } +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal.meta new file mode 100644 index 00000000..741b3fac --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_baker.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 834985f94b43cb94c8e0eb8b305255ac +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal new file mode 100644 index 00000000..24113550 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_cutout" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultCutout" + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + lilSubShaderBRP "Default" + lilSubShaderLWRP "Default" + lilSubShaderURP "Default" + lilSubShaderHDRP "Default" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal.meta new file mode 100644 index 00000000..b31d2d92 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c3006fa88f758644c964e3a6d0f9cc8e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal new file mode 100644 index 00000000..011335c1 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_lite_cutout" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultCutout" + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + lilSubShaderBRP "DefaultLite" + lilSubShaderLWRP "DefaultLite" + lilSubShaderURP "DefaultLite" + lilSubShaderHDRP "DefaultLite" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal.meta new file mode 100644 index 00000000..639db3b9 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b372f727dd3bf5943829a865f7292a1b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal new file mode 100644 index 00000000..1d3751aa --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_lite_opaque" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultOpaque" + } + + HLSLINCLUDE + #define LIL_RENDER 0 + ENDHLSL + + lilSubShaderBRP "DefaultLite" + lilSubShaderLWRP "DefaultLite" + lilSubShaderURP "DefaultLite" + lilSubShaderHDRP "DefaultLite" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal.meta new file mode 100644 index 00000000..6626369d --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_opaque.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bf502fb880aa31c47a7315e9ffbff85a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal new file mode 100644 index 00000000..a88542d3 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_lite_transparent" +{ + Properties + { + lilProperties "DefaultLite" + lilProperties "DefaultTransparent" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderBRP "DefaultLiteTwoSide" + lilSubShaderLWRP "DefaultLite" + lilSubShaderURP "DefaultLiteTwoSide" + lilSubShaderHDRP "DefaultLiteTwoSide" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal.meta new file mode 100644 index 00000000..ae8bc93b --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_lite_transparent.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9fa0b606799f40d42be0bd53dd521e89 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal new file mode 100644 index 00000000..c1b5cc27 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_opaque" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + HLSLINCLUDE + #define LIL_RENDER 0 + ENDHLSL + + lilSubShaderBRP "Default" + lilSubShaderLWRP "Default" + lilSubShaderURP "Default" + lilSubShaderHDRP "Default" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal.meta new file mode 100644 index 00000000..15b29cea --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_opaque.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5a12bb22862d779439fb11f240b24a3d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal new file mode 100644 index 00000000..cd2c8275 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal @@ -0,0 +1,21 @@ +Shader "Hidden/ltspass_proponly" +{ + Properties + { + lilProperties "DefaultAll" + } + + SubShader + { + Pass + { + Tags {"LightMode" = "Dummy"} + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + void vert(){} + void frag(){} + ENDHLSL + } + } +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal.meta new file mode 100644 index 00000000..d69670dc --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_proponly.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 247c834c8a61a6342bf6ace853c9e66c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal new file mode 100644 index 00000000..0b9dabda --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_tess_cutout" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultCutout" + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + lilSubShaderBRP "DefaultTessellation" + lilSubShaderLWRP "DefaultTessellation" + lilSubShaderURP "DefaultTessellation" + lilSubShaderHDRP "DefaultTessellation" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal.meta new file mode 100644 index 00000000..79f7531f --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_cutout.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4f2776effc2db5447b049cc192367280 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal new file mode 100644 index 00000000..623916ca --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_tess_opaque" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultOpaque" + } + + HLSLINCLUDE + #define LIL_RENDER 0 + ENDHLSL + + lilSubShaderBRP "DefaultTessellation" + lilSubShaderLWRP "DefaultTessellation" + lilSubShaderURP "DefaultTessellation" + lilSubShaderHDRP "DefaultTessellation" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal.meta new file mode 100644 index 00000000..935c24d4 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_opaque.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4fae626e00ffa5a41a14de200b47de1a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal new file mode 100644 index 00000000..84d0aed7 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_tess_transparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderBRP "DefaultTessellationTwoSide" + lilSubShaderLWRP "DefaultTessellation" + lilSubShaderURP "DefaultTessellationTwoSide" + lilSubShaderHDRP "DefaultTessellationTwoSide" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal.meta new file mode 100644 index 00000000..1fac4f72 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_tess_transparent.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 93d228154ccd81c408cab8f622e72823 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal b/Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal new file mode 100644 index 00000000..bcd4d542 --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal @@ -0,0 +1,17 @@ +Shader "Hidden/ltspass_transparent" +{ + Properties + { + lilProperties "Default" + lilProperties "DefaultTransparent" + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + lilSubShaderBRP "DefaultTwoSide" + lilSubShaderLWRP "Default" + lilSubShaderURP "DefaultTwoSide" + lilSubShaderHDRP "DefaultTwoSide" +} \ No newline at end of file diff --git a/Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal.meta b/Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal.meta new file mode 100644 index 00000000..b29eb78f --- /dev/null +++ b/Assets/External/lilToon/BaseShaderResources/ltspass_transparent.lilinternal.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6b20d895d976f444691f35b5e42cecaf +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CHANGELOG.md b/Assets/External/lilToon/CHANGELOG.md new file mode 100644 index 00000000..b40f748f --- /dev/null +++ b/Assets/External/lilToon/CHANGELOG.md @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5adc1607ce152012b2cd80642fdff01d954fcc6f45112d93d58bc9daecbc72c7 +size 21961 diff --git a/Assets/External/lilToon/CHANGELOG.md.meta b/Assets/External/lilToon/CHANGELOG.md.meta new file mode 100644 index 00000000..f3f8e89c --- /dev/null +++ b/Assets/External/lilToon/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3e475cdc396583e41b50cc858691ceb7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CHANGELOG_JP.md b/Assets/External/lilToon/CHANGELOG_JP.md new file mode 100644 index 00000000..3aafc018 --- /dev/null +++ b/Assets/External/lilToon/CHANGELOG_JP.md @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6da53157f876ac5a1d33bded6db56d5e9eeceb6eb71aff3c3029a1c2f4e6a109 +size 28966 diff --git a/Assets/External/lilToon/CHANGELOG_JP.md.meta b/Assets/External/lilToon/CHANGELOG_JP.md.meta new file mode 100644 index 00000000..00d79bc9 --- /dev/null +++ b/Assets/External/lilToon/CHANGELOG_JP.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d06477b230acf4940b70049030a8d306 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources.meta b/Assets/External/lilToon/CustomShaderResources.meta new file mode 100644 index 00000000..7ddd75d9 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1acd4e79a7d2c6c44aa8b97a1e33f20b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP.meta b/Assets/External/lilToon/CustomShaderResources/BRP.meta new file mode 100644 index 00000000..507796c8 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8ec4765379ac1da4194f8c91c2d9ba9b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock new file mode 100644 index 00000000..fece2d0e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock @@ -0,0 +1,326 @@ + SubShader + { + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Outline + Pass + { + Name "FORWARD_ADD_OUTLINE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite Off + ZTest LEqual + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One + BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster Outline + Pass + { + Name "SHADOW_CASTER_OUTLINE" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock.meta new file mode 100644 index 00000000..64922f3a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/Default.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6ebd61d6e59969d43af7fccbdec0e863 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock new file mode 100644 index 00000000..e1199ad1 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock @@ -0,0 +1,70 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FAKESHADOW + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_lightmaps + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlight + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fakeshadow.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock.meta new file mode 100644 index 00000000..1a0cf53f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFakeShadow.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6c7c6ea0cfb556b41a446160f4dd72e0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock new file mode 100644 index 00000000..7ebfee4a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock @@ -0,0 +1,286 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Fur + Pass + { + Name "FORWARD_ADD_FUR" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite Off + ZTest LEqual + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + Blend [_FurSrcBlendFA] [_FurDstBlendFA], Zero One + BlendOp [_FurBlendOpFA], [_FurBlendOpAlphaFA] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock.meta new file mode 100644 index 00000000..ef2c9327 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e7f8a4718705c745a415663d0b39e5d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock new file mode 100644 index 00000000..3f6bbde0 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock @@ -0,0 +1,384 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Fur Pre + Pass + { + Name "FORWARD_FUR_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite On + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp Add, Add + Blend One Zero, One OneMinusSrcAlpha + AlphaToMask On + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_FUR_PRE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Fur Pre + Pass + { + Name "FORWARD_ADD_FUR_PRE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite Off + ZTest LEqual + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + Blend [_FurSrcBlendFA] [_FurDstBlendFA], Zero One + BlendOp [_FurBlendOpFA], [_FurBlendOpAlphaFA] + AlphaToMask On + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_FUR_PRE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Fur + Pass + { + Name "FORWARD_ADD_FUR" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite Off + ZTest LEqual + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + Blend [_FurSrcBlendFA] [_FurDstBlendFA], Zero One + BlendOp [_FurBlendOpFA], [_FurBlendOpAlphaFA] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock.meta new file mode 100644 index 00000000..97bf77c7 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultFurTwoPass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5eb181e8f5bdd344394711e2d0aa33bb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock new file mode 100644 index 00000000..84046e7f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock @@ -0,0 +1,179 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + GrabPass {"_lilBackgroundTexture"} + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZWrite [_ZWrite] + Blend One Zero, Zero One + AlphaToMask [_AlphaToMask] + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock.meta new file mode 100644 index 00000000..364c9c67 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5925c530c913c4240bc95f0a0a490760 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock new file mode 100644 index 00000000..975d54a8 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock @@ -0,0 +1,326 @@ + SubShader + { + HLSLINCLUDE + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Outline + Pass + { + Name "FORWARD_ADD_OUTLINE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite Off + ZTest LEqual + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One + BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster Outline + Pass + { + Name "SHADOW_CASTER_OUTLINE" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock.meta new file mode 100644 index 00000000..35f77e7b --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLite.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9cf3e07844b8997479e0d390f5b2b262 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock new file mode 100644 index 00000000..4c681410 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock @@ -0,0 +1,374 @@ + SubShader + { + HLSLINCLUDE + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Outline + Pass + { + Name "FORWARD_ADD_OUTLINE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite Off + ZTest LEqual + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One + BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster Outline + Pass + { + Name "SHADOW_CASTER_OUTLINE" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock.meta new file mode 100644 index 00000000..3e810806 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultLiteTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0a0ee5b6c7efca646b758511c4e5c93b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock new file mode 100644 index 00000000..58c2c273 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock @@ -0,0 +1,314 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock.meta new file mode 100644 index 00000000..6e0df62a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMulti.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2c93e6dd050037949b2f476bdf063cd9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock new file mode 100644 index 00000000..e27fd8f5 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock @@ -0,0 +1,417 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Main + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Fur + Pass + { + Name "FORWARD_ADD_FUR" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite Off + ZTest LEqual + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + Blend [_FurSrcBlendFA] [_FurDstBlendFA], Zero One + BlendOp [_FurBlendOpFA], [_FurBlendOpAlphaFA] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + // Transparent mode + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Main + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock.meta new file mode 100644 index 00000000..628812e7 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 16181a2cf01e31c4e9787de436c89bf2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock new file mode 100644 index 00000000..20b0c6d4 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock @@ -0,0 +1,230 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + #define LIL_MULTI + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + // GrabPass + GrabPass {"_lilBackgroundTexture"} + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZWrite [_ZWrite] + Blend One Zero, Zero One + AlphaToMask [_AlphaToMask] + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock.meta new file mode 100644 index 00000000..c5910e57 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b0bad0f2615172e4982d62c745927949 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock new file mode 100644 index 00000000..9f9350fa --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock @@ -0,0 +1,448 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Outline + #pragma shader_feature_local _DETAIL_MULX2 + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Outline + Pass + { + Name "FORWARD_ADD_OUTLINE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite Off + ZTest LEqual + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One + BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Outline + #pragma shader_feature_local _DETAIL_MULX2 + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock.meta new file mode 100644 index 00000000..497f8a22 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bfb1b5de7e49a7e4cb01567cbb03a113 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock new file mode 100644 index 00000000..21edde6c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock @@ -0,0 +1,297 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + // GrabPass + GrabPass {"_lilBackgroundTexture"} + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock.meta new file mode 100644 index 00000000..ed1ae57f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultMultiRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: acef6a319b1ed094e8a9e7c5266f4819 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock new file mode 100644 index 00000000..0ba1bcb6 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock @@ -0,0 +1,191 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + // GrabPass + GrabPass {"_lilBackgroundTexture"} + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock.meta new file mode 100644 index 00000000..b6b920b4 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: efa02a893a9c77044b71522deeb0538c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock new file mode 100644 index 00000000..18432c26 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock @@ -0,0 +1,236 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_REFRACTION_BLUR2 + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + // GrabPass + GrabPass {"_lilBackgroundTexture"} + + *LIL_INSERT_PASS_PRE* + + // Forward Blur + Pass + { + Name "FORWARD_BLUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_refblur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // GrabPass + GrabPass {} + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock.meta new file mode 100644 index 00000000..7810bf6c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultRefractionBlur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0d43882e5e489874a8a7077741713715 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock new file mode 100644 index 00000000..7003ca30 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock @@ -0,0 +1,341 @@ + SubShader + { + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 5.0 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_TESSELLATION + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + #pragma multi_compile_domain _ VERTEXLIGHT_ON + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + #pragma multi_compile_domain _ VERTEXLIGHT_ON + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Outline + Pass + { + Name "FORWARD_ADD_OUTLINE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite Off + ZTest LEqual + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One + BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster Outline + Pass + { + Name "SHADOW_CASTER_OUTLINE" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock.meta new file mode 100644 index 00000000..e1ea5a46 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellation.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d814b8829fb05bc4f9aa50543561d7e3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock new file mode 100644 index 00000000..d66405b9 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock @@ -0,0 +1,394 @@ + SubShader + { + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 5.0 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_TESSELLATION + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + #pragma multi_compile_domain _ VERTEXLIGHT_ON + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + #pragma multi_compile_domain _ VERTEXLIGHT_ON + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + #pragma multi_compile_domain _ VERTEXLIGHT_ON + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Outline + Pass + { + Name "FORWARD_ADD_OUTLINE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite Off + ZTest LEqual + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One + BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster Outline + Pass + { + Name "SHADOW_CASTER_OUTLINE" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock.meta new file mode 100644 index 00000000..212f52a6 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTessellationTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: da0c0af4b2bc3ea4e9c4c61be252d9a2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock new file mode 100644 index 00000000..7b928096 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock @@ -0,0 +1,375 @@ + SubShader + { + HLSLINCLUDE + *LIL_SHADER_SETTING* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + //---------------------------------------------------------------------------------------------------------------------- + // ForwardAdd Start + // + + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite Off + ZTest LEqual + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + Blend [_SrcBlendFA] [_DstBlendFA], Zero One + BlendOp [_BlendOpFA], [_BlendOpAlphaFA] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ForwardAdd Outline + Pass + { + Name "FORWARD_ADD_OUTLINE" + Tags {"LightMode" = "ForwardAdd"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite Off + ZTest LEqual + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One + BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forwardadd + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // + // ForwardAdd End + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster Outline + Pass + { + Name "SHADOW_CASTER_OUTLINE" + Tags {"LightMode" = "ShadowCaster"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Offset 1, 1 + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock.meta new file mode 100644 index 00000000..83a621b3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b9708550141f10e43bb3459d5085ce6c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock new file mode 100644 index 00000000..fcb22ae0 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock @@ -0,0 +1,11 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock.meta new file mode 100644 index 00000000..bc010027 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 00f5dea61082f9047832df96848c7ae2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock new file mode 100644 index 00000000..22a50797 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock @@ -0,0 +1,9 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD_FUR" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock.meta new file mode 100644 index 00000000..9f71c8d6 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4f411ebc4b040c649b166d8e6717fc77 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock new file mode 100644 index 00000000..bbf0a9b2 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock @@ -0,0 +1,11 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR_PRE" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD_FUR_PRE" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD_FUR" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta new file mode 100644 index 00000000..d55e9047 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4ae07ee463221304293956bf2f15ded5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock new file mode 100644 index 00000000..53bf5a31 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock @@ -0,0 +1,10 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock.meta new file mode 100644 index 00000000..ed9e05f1 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAdd.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b8d0e7c3bef5f314f83c8e0d63521e51 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock new file mode 100644 index 00000000..fc154f1d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock @@ -0,0 +1,12 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_BACK" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock.meta new file mode 100644 index 00000000..6bac1f4e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassNoForwardAddTwo.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 620db7f8e34f72140a8f468ffa1cb1bd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock new file mode 100644 index 00000000..050ff84d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock @@ -0,0 +1,13 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock.meta new file mode 100644 index 00000000..85c50c2e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 428a3fc553730bf4899e4b4ce39959dc +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock new file mode 100644 index 00000000..39d2d79a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock @@ -0,0 +1,11 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock.meta new file mode 100644 index 00000000..77b2ee51 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAdd.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bced9aae66b144f438238df93290a8c4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock new file mode 100644 index 00000000..7d0f1e7e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock @@ -0,0 +1,14 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_BACK" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock.meta new file mode 100644 index 00000000..e60dac49 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineNoForwardAddTwo.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2148db6b95d2a5746b4e98f042303551 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock new file mode 100644 index 00000000..8794b3cb --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock @@ -0,0 +1,9 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD_OUTLINE" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock.meta new file mode 100644 index 00000000..562240a3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOutlineOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 64cd17e64423ad54c93b2bc3565b85c3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock new file mode 100644 index 00000000..6e8df935 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock @@ -0,0 +1,9 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_ADD" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock.meta new file mode 100644 index 00000000..6b513fde --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlay.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bdb497c8d186c0245ae1af1bbb1ba7c0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock new file mode 100644 index 00000000..4ed1d03e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Unlit/Texture" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock.meta new file mode 100644 index 00000000..10f08072 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/BRP/DefaultUsePassOverlayNoForwardAdd.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1ecf000c4bfed3b4ea74aba3f1956e16 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP.meta b/Assets/External/lilToon/CustomShaderResources/HDRP.meta new file mode 100644 index 00000000..9ee39951 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0feeadac692192478f736451121d4b8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock new file mode 100644 index 00000000..c2f5fdb0 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock @@ -0,0 +1,426 @@ + SubShader + { + Tags {"RenderType" = "HDLitShader"} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline + Pass + { + Name "DEPTHONLY_OUTLINE" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline Only + Pass + { + Name "DEPTHONLY_OUTLINEONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline + Pass + { + Name "MOTIONVECTORS_OUTLINE" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline Only + Pass + { + Name "MOTIONVECTORS_OUTLINEONLY" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock.meta new file mode 100644 index 00000000..c2e9cf96 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/Default.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a64f7da9c81e33a419ca1be23db274fc +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock new file mode 100644 index 00000000..819290c4 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock @@ -0,0 +1,70 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FAKESHADOW + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_lightmaps + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlight + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_lightlists + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fakeshadow.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock.meta new file mode 100644 index 00000000..9b141df3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFakeShadow.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5cadb973160f403488e58f5ea9c9d5ef +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock new file mode 100644 index 00000000..9703f5eb --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock @@ -0,0 +1,261 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #pragma require geometry + #define LIL_FUR + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock.meta new file mode 100644 index 00000000..37950bfd --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: be9bfef949d2cf64894907b66c326962 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock new file mode 100644 index 00000000..0e6fd16b --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock @@ -0,0 +1,307 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #pragma require geometry + #define LIL_FUR + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Fur Pre + Pass + { + Name "FORWARD_FUR_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite On + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp Add, Add + Blend One Zero, One OneMinusSrcAlpha + AlphaToMask On + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_FUR_PRE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock.meta new file mode 100644 index 00000000..b05b613a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultFurTwoPass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ec3c15b0b24338c41b099770d56cfbf2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock new file mode 100644 index 00000000..a629ad54 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock @@ -0,0 +1,252 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + #define SHADERPASS SHADERPASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock.meta new file mode 100644 index 00000000..46ffe30a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: adc33142a62c77c4988827b484fcc28d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock new file mode 100644 index 00000000..d7e32848 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock @@ -0,0 +1,342 @@ + SubShader + { + Tags {"RenderType" = "HDLitShader"} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline + Pass + { + Name "DEPTHONLY_OUTLINE" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline + Pass + { + Name "MOTIONVECTORS_OUTLINE" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock.meta new file mode 100644 index 00000000..f7dc43d8 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLite.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3906b4fe9b2dc1749a6f6b3f73b6e0dd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock new file mode 100644 index 00000000..34a4177d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock @@ -0,0 +1,387 @@ + SubShader + { + Tags {"RenderType" = "HDLitShader"} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline + Pass + { + Name "DEPTHONLY_OUTLINE" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline + Pass + { + Name "MOTIONVECTORS_OUTLINE" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock.meta new file mode 100644 index 00000000..6d662f8d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultLiteTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c23cd36fbb7e4a74eab43cb9d52ba2aa +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock new file mode 100644 index 00000000..9741ff69 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock @@ -0,0 +1,332 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock.meta new file mode 100644 index 00000000..ea3daa7c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMulti.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8403ccf21be7951498107a9c05eb036b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock new file mode 100644 index 00000000..5d2cf71e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock @@ -0,0 +1,379 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Main + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_FUR + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock.meta new file mode 100644 index 00000000..b493d6ca --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 78edba89c27973c4d872d5acb97ddb49 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock new file mode 100644 index 00000000..f8e58898 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock @@ -0,0 +1,318 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + #define LIL_MULTI + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Outline + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Outline + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock.meta new file mode 100644 index 00000000..6820fd93 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 099f08aefc3f6c74d9ee0ec3df919fd9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock new file mode 100644 index 00000000..0fd26db1 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock @@ -0,0 +1,397 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Outline + #pragma shader_feature_local _DETAIL_MULX2 + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline + Pass + { + Name "DEPTHONLY_OUTLINE" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline + Pass + { + Name "MOTIONVECTORS_OUTLINE" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_motionvectors + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock.meta new file mode 100644 index 00000000..6c75a8ec --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b7d19310e8c28d846816d0ee4dd1ef55 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock new file mode 100644 index 00000000..00bb51c7 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock @@ -0,0 +1,302 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Outline + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Outline + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock.meta new file mode 100644 index 00000000..8a6e362d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultMultiRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f7e54a173d5111f4f96bee3a041c4db2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock new file mode 100644 index 00000000..fa0a4ef8 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock @@ -0,0 +1,206 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock.meta new file mode 100644 index 00000000..ca3cadec --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 01ee6f4fd5310594c9e21252bbb3b4c7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock new file mode 100644 index 00000000..88cd30f9 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock @@ -0,0 +1,209 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_REFRACTION_BLUR2 + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock.meta new file mode 100644 index 00000000..622d9e7b --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultRefractionBlur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5dd8756254fb31749a5358c8a016024a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock new file mode 100644 index 00000000..8bced637 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock @@ -0,0 +1,361 @@ + SubShader + { + Tags {"RenderType" = "HDLitShader"} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline + Pass + { + Name "DEPTHONLY_OUTLINE" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma geometry geom + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma require geometry + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline + Pass + { + Name "MOTIONVECTORS_OUTLINE" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma geometry geom + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma require geometry + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock.meta new file mode 100644 index 00000000..2ae4eeb9 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellation.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 30a9295b35a61c54088a3b40502b80ad +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock new file mode 100644 index 00000000..39789476 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock @@ -0,0 +1,410 @@ + SubShader + { + Tags {"RenderType" = "HDLitShader"} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline + Pass + { + Name "DEPTHONLY_OUTLINE" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma geometry geom + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma require geometry + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline + Pass + { + Name "MOTIONVECTORS_OUTLINE" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma geometry geom + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma require geometry + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock.meta new file mode 100644 index 00000000..c7637a9f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTessellationTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d0a9c6457c374ec42adf9c3b7572f792 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock new file mode 100644 index 00000000..3c1d5280 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock @@ -0,0 +1,472 @@ + SubShader + { + Tags {"RenderType" = "HDLitShader"} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + WriteMask 6 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + + Cull[_Cull] + ZClip [_ZClip] + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline + Pass + { + Name "DEPTHONLY_OUTLINE" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly Outline Only + Pass + { + Name "DEPTHONLY_OUTLINEONLY" + Tags {"LightMode" = "DepthForwardOnly"} + + Stencil + { + WriteMask 8 + Ref 0 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline + Pass + { + Name "MOTIONVECTORS_OUTLINE" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull Back + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + Offset [_OffsetFactor], [_OffsetUnits] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma require geometry + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_ONEPASS_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors Outline Only + Pass + { + Name "MOTIONVECTORS_OUTLINEONLY" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + WriteMask 40 + Ref 32 + Comp Always + Pass Replace + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "META"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_hdrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock.meta new file mode 100644 index 00000000..09b33d73 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fe8077ab809b0c949a0bd4254706715b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock new file mode 100644 index 00000000..14e308a3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock @@ -0,0 +1,12 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock.meta new file mode 100644 index 00000000..513bd64e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4ee13c47ed046a44aa56cfe097299517 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock new file mode 100644 index 00000000..54ecfa64 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock.meta new file mode 100644 index 00000000..73ff25e0 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bef72fca1ee8e644784cca859bb5ea81 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock new file mode 100644 index 00000000..bed6a0e3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock @@ -0,0 +1,9 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR_PRE" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta new file mode 100644 index 00000000..e8031998 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassFurOnlyTwoPass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2ab592bb32393214a868d09a13bf5063 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock new file mode 100644 index 00000000..a52aa270 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock @@ -0,0 +1,13 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock.meta new file mode 100644 index 00000000..b3bcc877 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 480bdca31a882bb40b2d22b7b8d63912 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock new file mode 100644 index 00000000..f5ffa540 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock @@ -0,0 +1,10 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS_OUTLINE" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock.meta new file mode 100644 index 00000000..26556d6f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6402151328afd96488288abb67d3b620 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock new file mode 100644 index 00000000..d24a5cef --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock @@ -0,0 +1,14 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_BACK" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock.meta new file mode 100644 index 00000000..2675497a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOutlineTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 12a5a658d1e02d44fb80fe9919467f29 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock new file mode 100644 index 00000000..84fe7607 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock.meta new file mode 100644 index 00000000..94fc3561 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassOverlay.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2a987eb1e65490941b28df3622d18d30 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock new file mode 100644 index 00000000..1ea51fad --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock @@ -0,0 +1,13 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_BACK" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "HDRP/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock.meta new file mode 100644 index 00000000..e9566ac7 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/HDRP/DefaultUsePassTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 84383628f721b1a45a4ccb8743f62543 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP.meta b/Assets/External/lilToon/CustomShaderResources/LWRP.meta new file mode 100644 index 00000000..7a67ab3d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f02515fedd77e154b87aa67da1943b50 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock new file mode 100644 index 00000000..a5d3dfc8 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock @@ -0,0 +1,248 @@ + SubShader + { + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock.meta new file mode 100644 index 00000000..849a5808 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/Default.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6f81c1e4decfeef40bd0373a1c272aae +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock new file mode 100644 index 00000000..a43c0c31 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock @@ -0,0 +1,73 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FAKESHADOW + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_lightmaps + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlight + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_lightlists + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fakeshadow.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock.meta new file mode 100644 index 00000000..4e25cc50 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFakeShadow.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 31e569e8abbf0934180a99b7b1a93fed +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock new file mode 100644 index 00000000..92c75b3e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock @@ -0,0 +1,250 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock.meta new file mode 100644 index 00000000..4d76c068 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6c0802963fc1f8e44accf44a889d5919 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock new file mode 100644 index 00000000..86df73bc --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock @@ -0,0 +1,245 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock.meta new file mode 100644 index 00000000..3d0ce1a1 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 81ac836e59899a04688d2ee5489f49df +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock new file mode 100644 index 00000000..40b4b102 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock @@ -0,0 +1,248 @@ + SubShader + { + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock.meta new file mode 100644 index 00000000..f730b949 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultLite.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8a131adf58d7ebd4f997018082145fb3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock new file mode 100644 index 00000000..14ebfed1 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock @@ -0,0 +1,307 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock.meta new file mode 100644 index 00000000..56938191 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMulti.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 30f154ac0ba7232459893a88749cda94 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock new file mode 100644 index 00000000..633a337a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock @@ -0,0 +1,356 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Main + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock.meta new file mode 100644 index 00000000..a3bf5b5a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9143ec0d4677acd43927bb69cd1cda1b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock new file mode 100644 index 00000000..94a28606 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock @@ -0,0 +1,301 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + #define LIL_MULTI + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock.meta new file mode 100644 index 00000000..9ad7e953 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0f103d6b53fb84547b9fa73dfa6d3afd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock new file mode 100644 index 00000000..7548338b --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock @@ -0,0 +1,373 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Outline + #pragma shader_feature_local _DETAIL_MULX2 + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock.meta new file mode 100644 index 00000000..a5ac251f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 448812a833587e64986bb97db89a3bdb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock new file mode 100644 index 00000000..2d3356fa --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock @@ -0,0 +1,281 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock.meta new file mode 100644 index 00000000..a18bacf2 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultMultiRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8313281cdfa5e824e943e525c9167d5d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock new file mode 100644 index 00000000..6e8f5f20 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock @@ -0,0 +1,200 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock.meta new file mode 100644 index 00000000..d0de7fda --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4b28ae398a79802498b44d995c17f61e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock new file mode 100644 index 00000000..3dd8731e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock @@ -0,0 +1,196 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_REFRACTION_BLUR2 + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock.meta new file mode 100644 index 00000000..5dab484b --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultRefractionBlur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a64c06017b143824aaa49d77ec00c393 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock new file mode 100644 index 00000000..44d08089 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock @@ -0,0 +1,256 @@ + SubShader + { + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Lightweight2D + Pass + { + Name "LIGHTWEIGHT2D" + Tags {"LightMode" = "Lightweight2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_lwrp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock.meta new file mode 100644 index 00000000..449cabde --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultTessellation.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9373cce6cc2477d49b1ed7235ad83114 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock new file mode 100644 index 00000000..83d675da --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock @@ -0,0 +1,12 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/LIGHTWEIGHT2D" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock.meta new file mode 100644 index 00000000..9917108a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b3b20e7176d1ee649856ccd9a7c74a2e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock new file mode 100644 index 00000000..eb74aa75 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock.meta new file mode 100644 index 00000000..13cfec80 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassFurOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3e0b26e4465bee845b415c4b985f11b0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock new file mode 100644 index 00000000..56c6d87a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock @@ -0,0 +1,13 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/LIGHTWEIGHT2D" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock.meta new file mode 100644 index 00000000..a9e47a87 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5aff6f07c94ee1e4b8b1a0667f231708 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock new file mode 100644 index 00000000..1499598e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock.meta new file mode 100644 index 00000000..c00b1a34 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOutlineOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cbe3b405688ea014c92e5ea176b0090b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock new file mode 100644 index 00000000..4f10b448 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Lightweight Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock.meta new file mode 100644 index 00000000..0a6fdc61 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/LWRP/DefaultUsePassOverlay.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 69e4aaf771a269745a72739117621d48 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Misc.meta b/Assets/External/lilToon/CustomShaderResources/Misc.meta new file mode 100644 index 00000000..ec1b6a1b --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Misc.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b800294f0600ca24fabd672f80d0b54e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock b/Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock new file mode 100644 index 00000000..d1914f7a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock @@ -0,0 +1,70 @@ +Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock.meta new file mode 100644 index 00000000..9e8f8855 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Misc/ReferenceUVs.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 04745f0b0223a104c8fe768ed5e2f57a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties.meta b/Assets/External/lilToon/CustomShaderResources/Properties.meta new file mode 100644 index 00000000..20d2bfd9 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5717423b4e18cdf49bcba4bb5a1bdc5f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock new file mode 100644 index 00000000..aa2e358d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock @@ -0,0 +1,602 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 0 diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock.meta new file mode 100644 index 00000000..c73e3e4a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/Default.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d7fa25c78b38bbb4fa3a5c9b1dd4f46f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock new file mode 100644 index 00000000..5ba12288 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock @@ -0,0 +1,729 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("Blend Main", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("sColor", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("sColor", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("sColor", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("sColor", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("sColor", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("sColor", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("Blend Main", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("Blend Main", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("Blend Main", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Stencil Compare Function", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Stencil Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Stencil Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("Stencil ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("SrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("DstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Stencil Compare Function", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Stencil Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Stencil Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("Stencil ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.1 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 0.5 + [lilToggle] _RefractionColorFromMain ("sColorFromMain", Int) = 0 + _RefractionColor ("sColor", Color) = (1,1,1,1) + + //---------------------------------------------------------------------------------------------------------------------- + //Gem + _GemChromaticAberration ("sChromaticAberration", Range(0, 1)) = 0.02 + _GemEnvContrast ("sContrast", Float) = 2.0 + [lilHDR] _GemEnvColor ("sEnvironmentColor", Color) = (1,1,1,1) + _GemParticleLoop ("sParticleLoop", Float) = 8 + [lilHDR] _GemParticleColor ("sColor", Color) = (4,4,4,1) + _GemVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("Cutout Length", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("SrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("DstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Stencil Compare Function", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Stencil Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Stencil Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("Stencil ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilVec3Float] _FakeShadowVector ("sFakeShadowVectors", Vector) = (0,0,0,0.05) \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock.meta new file mode 100644 index 00000000..9bbeb1d9 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultAll.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 62ddfb21f2f86464086c1a2d5b53c8da +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock new file mode 100644 index 00000000..8dbabc86 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock @@ -0,0 +1,60 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock.meta new file mode 100644 index 00000000..be799130 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultCutout.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c856b023d8a0dd441ba39eb3a28554fb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock new file mode 100644 index 00000000..904a7b6f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock @@ -0,0 +1,84 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (0.925,0.7,0.74,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilVec3Float] _FakeShadowVector ("sFakeShadowVectors", Vector) = (0,0,0,0.05) + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 51 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 3 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 0 \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock.meta new file mode 100644 index 00000000..65a4d505 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFakeShadow.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b33476967d36e3143aa915a3d1e9097a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock new file mode 100644 index 00000000..d53df74c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock @@ -0,0 +1,81 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 1 \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock.meta new file mode 100644 index 00000000..f4f3801d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurCutout.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dbfd8bcca48bc4a42b819210b3c69b76 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock new file mode 100644 index 00000000..07ab6372 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock @@ -0,0 +1,81 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 0 \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock.meta new file mode 100644 index 00000000..c77fd8f2 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultFurTransparent.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a465e9a7ac56e5a418e010f6c348082b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock new file mode 100644 index 00000000..d62d280a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock @@ -0,0 +1,44 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.5 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + //Gem + _GemChromaticAberration ("sChromaticAberration", Range(0, 1)) = 0.02 + _GemEnvContrast ("sContrast", Float) = 2.0 + [lilHDR] _GemEnvColor ("sEnvironmentColor", Color) = (1,1,1,1) + _GemParticleLoop ("sParticleLoop", Float) = 8 + [lilHDR] _GemParticleColor ("sColor", Color) = (4,4,4,1) + _GemVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock.meta new file mode 100644 index 00000000..16783cbe --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d309f3cf3370f764cbf2a8b331649e89 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock new file mode 100644 index 00000000..7ee8acf4 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock @@ -0,0 +1,86 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 0 diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock.meta new file mode 100644 index 00000000..724fda43 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultLite.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2b3e8b14255901b4aa9076d5b3702f3f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock new file mode 100644 index 00000000..bcb3a5d6 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock @@ -0,0 +1,60 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock.meta new file mode 100644 index 00000000..3015c3b8 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultOpaque.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d606e20cb007db44f8a51f967149568c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock new file mode 100644 index 00000000..a9916910 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock @@ -0,0 +1,37 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.1 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 0.5 + [lilToggle] _RefractionColorFromMain ("sColorFromMain", Int) = 0 + _RefractionColor ("sColor", Color) = (1,1,1,1) \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock.meta new file mode 100644 index 00000000..f37d2cbd --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 76b615f827dd4934188b73496792cf34 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock new file mode 100644 index 00000000..aa6042b0 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock @@ -0,0 +1,93 @@ + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock.meta new file mode 100644 index 00000000..e497b979 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/Properties/DefaultTransparent.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 07d1f74ed36ca5941a3d35c9c51abf19 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP.meta b/Assets/External/lilToon/CustomShaderResources/URP.meta new file mode 100644 index 00000000..5615d844 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d2de820746c7cca45ba92d4107ac667a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock new file mode 100644 index 00000000..c4dcc3aa --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock @@ -0,0 +1,344 @@ + SubShader + { + Tags {*LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock.meta new file mode 100644 index 00000000..a0aabb9e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/Default.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1fa9fc04ea38cda4795242e8c9241e92 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock new file mode 100644 index 00000000..4524658f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock @@ -0,0 +1,73 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FAKESHADOW + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_lightmaps + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlight + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_lightlists + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fakeshadow.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock.meta new file mode 100644 index 00000000..51c7afa3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFakeShadow.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1515ef93c2b80134db785ddc1512bd26 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock new file mode 100644 index 00000000..1f7e9279 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock @@ -0,0 +1,345 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock.meta new file mode 100644 index 00000000..e1dd924f --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9bda4ec5bfb8516458df75e1a185716f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock new file mode 100644 index 00000000..70ba7fbf --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock @@ -0,0 +1,394 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Fur Pre + Pass + { + Name "FORWARD_FUR_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite On + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp Add, Add + Blend One Zero, One OneMinusSrcAlpha + AlphaToMask On + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_FUR_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock.meta new file mode 100644 index 00000000..4a957858 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultFurTwoPass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 314c973dce805b74e96ce9a63de07a56 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock new file mode 100644 index 00000000..ec617813 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock @@ -0,0 +1,340 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock.meta new file mode 100644 index 00000000..84b85522 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 961baf17f871eb54296407f50922b3dc +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock new file mode 100644 index 00000000..36e19e10 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock @@ -0,0 +1,345 @@ + SubShader + { + Tags {*LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5* + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock.meta new file mode 100644 index 00000000..52eb3818 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLite.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4fb29da42d1cd9949925db60be31b013 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock new file mode 100644 index 00000000..d4e58ff5 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock @@ -0,0 +1,393 @@ + SubShader + { + Tags {*LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5* + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + #pragma lil_skip_variants_reflections + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock.meta new file mode 100644 index 00000000..d83ade32 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultLiteTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 74108b09605a5bf42a5c62a171394b72 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock new file mode 100644 index 00000000..d918b2b8 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock @@ -0,0 +1,425 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock.meta new file mode 100644 index 00000000..92f1c66d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMulti.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f9705638ec77d6e43b2435aa70be6e13 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock new file mode 100644 index 00000000..b0cf6af0 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock @@ -0,0 +1,469 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Main + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_fur.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock.meta new file mode 100644 index 00000000..1fde5fc3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiFur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f38085a4c53e19646a7e9431db5e4c63 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock new file mode 100644 index 00000000..def9ef6e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock @@ -0,0 +1,411 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + #define LIL_MULTI + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_shadows + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward_gem.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock.meta new file mode 100644 index 00000000..b1a53ec9 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiGem.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 18b966d7e027df543837bf5295d8a4d3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock new file mode 100644 index 00000000..dc2934b5 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock @@ -0,0 +1,491 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Outline + #pragma shader_feature_local _DETAIL_MULX2 + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock.meta new file mode 100644 index 00000000..87a10686 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8d3b22fef4361a04a9b31d85a7cac0b0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock new file mode 100644 index 00000000..8d26e31c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock @@ -0,0 +1,389 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock.meta new file mode 100644 index 00000000..a918b28c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultMultiRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cefcd13bac037984a88dae574d6d2ca0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock new file mode 100644 index 00000000..c00c944e --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock @@ -0,0 +1,295 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock.meta new file mode 100644 index 00000000..c6cd5147 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefraction.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9553c5eaad8a50c4f951cfe14584ea9a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock new file mode 100644 index 00000000..34de5aeb --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock @@ -0,0 +1,290 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS**LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_REFRACTION_BLUR2 + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock.meta new file mode 100644 index 00000000..b3c3799a --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultRefractionBlur.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2341159bc9ad4ca48b131d077085c04c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock new file mode 100644 index 00000000..99876504 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock @@ -0,0 +1,352 @@ + SubShader + { + Tags {*LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock.meta new file mode 100644 index 00000000..aa371544 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellation.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b84271f40c7935348a3cd2e6b6ad4241 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock new file mode 100644 index 00000000..23e0fb0c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock @@ -0,0 +1,404 @@ + SubShader + { + Tags {*LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock.meta new file mode 100644 index 00000000..fd4a7b36 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTessellationTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 793ed55269c25af4a853288256961839 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock new file mode 100644 index 00000000..06116257 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock @@ -0,0 +1,393 @@ + SubShader + { + Tags {*LIL_DOTS_SM_TAGS*} + HLSLINCLUDE + *LIL_SHADER_SETTING* + *LIL_SRP_VERSION* + *LIL_DOTS_SM_4_5_OR_3_5* + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma lil_skip_variants_decals + #pragma lil_skip_variants_addlightshadows + #pragma lil_skip_variants_probevolumes + #pragma lil_skip_variants_ao + ENDHLSL + + *LIL_INSERT_PASS_PRE* + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_base_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_2*"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_forward + #pragma lil_skip_variants_outline_shadows + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_forward.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_shadowcaster + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_shadowcaster.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthonly + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthonly.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_depthnormals + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_depthnormals.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_motionvectors + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_motionvectors.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_universal2d.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma lil_multi_compile_meta + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + *LIL_SUBSHADER_INSERT* + + #include "Includes/lil_pass_meta.hlsl" + + *LIL_SUBSHADER_INSERT_POST* + ENDHLSL + } + + *LIL_INSERT_PASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock.meta new file mode 100644 index 00000000..80cd0dc5 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6236a75c2c60df7478099584884584e3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock new file mode 100644 index 00000000..7482aa80 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock @@ -0,0 +1,14 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHNORMALS" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS" + UsePass "*LIL_PASS_SHADER_NAME*/UNIVERSAL2D" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock.meta new file mode 100644 index 00000000..1406ede4 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 95d7eda411290484783f75e6af497e3b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock new file mode 100644 index 00000000..136f0ec2 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock.meta new file mode 100644 index 00000000..fafa7948 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5a61d0630d28c694892a19e9947e6fc1 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock new file mode 100644 index 00000000..7b8d7b8c --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock @@ -0,0 +1,9 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR_PRE" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_FUR" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock.meta new file mode 100644 index 00000000..f8df9121 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassFurOnlyTwoPass.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a9266652633a6c04e9a99dd62fb00edd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock new file mode 100644 index 00000000..110c3dd3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock @@ -0,0 +1,15 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHNORMALS" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS" + UsePass "*LIL_PASS_SHADER_NAME*/UNIVERSAL2D" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock.meta new file mode 100644 index 00000000..70563192 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutline.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 759e1e97cdbff9443beb81b9fb9885de +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock new file mode 100644 index 00000000..303ed6fb --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock.meta new file mode 100644 index 00000000..f1c987fa --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineOnly.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d2e23c2368064ee4dae459416be4b593 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock new file mode 100644 index 00000000..727679b3 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock @@ -0,0 +1,16 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_BACK" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_OUTLINE" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHNORMALS" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS" + UsePass "*LIL_PASS_SHADER_NAME*/UNIVERSAL2D" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock.meta new file mode 100644 index 00000000..f4f6489b --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOutlineTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e27e9b6f6d46fd349b9b5d153597df2e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock new file mode 100644 index 00000000..6abf3e39 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock @@ -0,0 +1,8 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock.meta new file mode 100644 index 00000000..bfa502e1 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassOverlay.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 01465615d40a0e24496ade150efb677d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock new file mode 100644 index 00000000..860cb627 --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock @@ -0,0 +1,15 @@ + SubShader + { + Tags {*LIL_SUBSHADER_TAGS*} + *LIL_INSERT_USEPASS_PRE* + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD_BACK" + UsePass "*LIL_PASS_SHADER_NAME*/FORWARD" + UsePass "*LIL_PASS_SHADER_NAME*/SHADOW_CASTER" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHONLY" + UsePass "*LIL_PASS_SHADER_NAME*/DEPTHNORMALS" + UsePass "*LIL_PASS_SHADER_NAME*/MOTIONVECTORS" + UsePass "*LIL_PASS_SHADER_NAME*/UNIVERSAL2D" + UsePass "*LIL_PASS_SHADER_NAME*/META" + *LIL_INSERT_USEPASS_POST* + } + Fallback "Universal Render Pipeline/Unlit" \ No newline at end of file diff --git a/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock.meta b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock.meta new file mode 100644 index 00000000..cb04cc8d --- /dev/null +++ b/Assets/External/lilToon/CustomShaderResources/URP/DefaultUsePassTwoSide.lilblock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e57254ea5f70ba4b89f617df6d09169 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor.meta b/Assets/External/lilToon/Editor.meta new file mode 100644 index 00000000..203e7889 --- /dev/null +++ b/Assets/External/lilToon/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3e73d675b9c1adc4f8b6b8ef01bce51c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/CurrentRP.txt b/Assets/External/lilToon/Editor/CurrentRP.txt new file mode 100644 index 00000000..6ecfea71 --- /dev/null +++ b/Assets/External/lilToon/Editor/CurrentRP.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:239e4707167426baf32fb877c5dbc6d9f4bce53354eef80a16e04cdec2c8c377 +size 19 diff --git a/Assets/External/lilToon/Editor/CurrentRP.txt.meta b/Assets/External/lilToon/Editor/CurrentRP.txt.meta new file mode 100644 index 00000000..450170d7 --- /dev/null +++ b/Assets/External/lilToon/Editor/CurrentRP.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 142b3aeca72105442a83089b616e92b8 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources.meta b/Assets/External/lilToon/Editor/Resources.meta new file mode 100644 index 00000000..17b52531 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c3667fc522c90ee40a328bbc27446ab1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png b/Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png new file mode 100644 index 00000000..258ab056 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1cffdba4162d4fffcf3f95b73c921a8fb9f072226f25aff88f643cbe62cb2f8 +size 120 diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png.meta b/Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png.meta new file mode 100644 index 00000000..de886100 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_dark.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: bb1313c9ea1425b41b74e98fd04bcbc8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png new file mode 100644 index 00000000..9248760c --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3674606965244a2224510354ef59df048ac802aa51ff9f47864fd8a78b050cb +size 109 diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png.meta b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png.meta new file mode 100644 index 00000000..9264fde8 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_dark.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: a72199a4c9cc3714d8edfbc5d3b13823 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png new file mode 100644 index 00000000..5fc7aa25 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:010128b50ff46b0c704e3955211d457bb46f9b13c89b8d13000833e2ef891753 +size 110 diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png.meta b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png.meta new file mode 100644 index 00000000..e04f7095 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_half_light.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: 8343038a4a0cbef4d8af45c073520436 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png b/Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png new file mode 100644 index 00000000..90f1ae8b --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03dedfc282e8444e4841e5439cd6bfe8b71390304334ec5c9453e9bd303c8de0 +size 121 diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png.meta b/Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png.meta new file mode 100644 index 00000000..4454ffab --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_inner_light.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: f18d71f528511e748887f5e246abcc16 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png b/Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png new file mode 100644 index 00000000..0fc19fe8 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b713ead99787819e69a41d5db464ebfb13c397ab2825d189e4a59d6cbee78e4 +size 174 diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png.meta b/Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png.meta new file mode 100644 index 00000000..7b0c8181 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_outer_dark.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: 29f3c01461cd0474eab36bf2e939bb58 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png b/Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png new file mode 100644 index 00000000..4748283e --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb4801a9af4253979fd139384cdf84b79ecfe586e91d754da99fbdf3c534b9c2 +size 144 diff --git a/Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png.meta b/Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png.meta new file mode 100644 index 00000000..2c258f06 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_box_outer_light.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: 16cc103a658d8404894e66dd8f35cb77 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png b/Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png new file mode 100644 index 00000000..8df9511e --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba04fc9dc9600d592b426534342e983503434ed1e04baf3aed75816d909277af +size 126 diff --git a/Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png.meta b/Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png.meta new file mode 100644 index 00000000..5aaeaee2 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_custom_box_dark.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: 45dfb1bafd2c7d34ab453c29c0b1f46e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png b/Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png new file mode 100644 index 00000000..27467188 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:685d10445e93f6cee217491dc5d69ad17abe0339df942cfa69a60b0e4d4a9570 +size 122 diff --git a/Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png.meta b/Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png.meta new file mode 100644 index 00000000..f2a90997 --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/gui_custom_box_light.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: a1ed8756474bfd34f80fa22e6c43b2e5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/Resources/lang.txt b/Assets/External/lilToon/Editor/Resources/lang.txt new file mode 100644 index 00000000..4ce1e09e --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/lang.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e94ce9f73d2723081a3097496b6d42382da070bebf051bcd99d3f4fa5913227c +size 63094 diff --git a/Assets/External/lilToon/Editor/Resources/lang.txt.meta b/Assets/External/lilToon/Editor/Resources/lang.txt.meta new file mode 100644 index 00000000..b66afa9b --- /dev/null +++ b/Assets/External/lilToon/Editor/Resources/lang.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a63ad2f5296744a4bad011de744ba8ba +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/assembly-info.cs b/Assets/External/lilToon/Editor/assembly-info.cs new file mode 100644 index 00000000..90006f30 --- /dev/null +++ b/Assets/External/lilToon/Editor/assembly-info.cs @@ -0,0 +1,2 @@ +using System.Runtime.CompilerServices; +[assembly:InternalsVisibleTo("lilToon.Editor.External")] diff --git a/Assets/External/lilToon/Editor/assembly-info.cs.meta b/Assets/External/lilToon/Editor/assembly-info.cs.meta new file mode 100644 index 00000000..972b05ae --- /dev/null +++ b/Assets/External/lilToon/Editor/assembly-info.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9efd7071fe939574d959140f124b8e5e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/csc.rsp b/Assets/External/lilToon/Editor/csc.rsp new file mode 100644 index 00000000..39662d9b --- /dev/null +++ b/Assets/External/lilToon/Editor/csc.rsp @@ -0,0 +1,2 @@ +-r:System.Drawing.dll +-define:SYSTEM_DRAWING \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/csc.rsp.meta b/Assets/External/lilToon/Editor/csc.rsp.meta new file mode 100644 index 00000000..ad5ce35a --- /dev/null +++ b/Assets/External/lilToon/Editor/csc.rsp.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 17c2370ca1618cd428c70b9966b5666f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilConstants.cs b/Assets/External/lilToon/Editor/lilConstants.cs new file mode 100644 index 00000000..d720f571 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilConstants.cs @@ -0,0 +1,29 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; + +namespace lilToon +{ + public class lilConstants + { + public const string currentVersionName = "1.9.0"; + public const int currentVersionValue = 45; + + internal const string boothURL = "https://lilxyzw.booth.pm/"; + internal const string githubURL = "https://github.com/lilxyzw/lilToon"; + internal const string versionInfoURL = "https://raw.githubusercontent.com/lilxyzw/lilToon/master/version.json"; + + internal static readonly string[] mainTexCheckWords = new[] {"mask", "shadow", "shade", "outline", "normal", "bumpmap", "matcap", "rimlight", "emittion", "reflection", "specular", "roughness", "smoothness", "metallic", "metalness", "opacity", "parallax", "displacement", "height", "ambient", "occlusion"}; + + public static readonly Vector2 defaultTextureOffset = new Vector2(0.0f,0.0f); + public static readonly Vector2 defaultTextureScale = new Vector2(1.0f,1.0f); + public static readonly Vector4 defaultScrollRotate = new Vector4(0.0f,0.0f,0.0f,0.0f); + public static readonly Vector4 defaultHSVG = new Vector4(0.0f,1.0f,1.0f,1.0f); + public static readonly Vector4 defaultKeys = new Vector4(0.0f,0.0f,0.0f,0.0f); + public static readonly Vector4 defaultDecalAnim = new Vector4(1.0f,1.0f,1.0f,30.0f); + public static readonly Vector4 defaultDissolveParams = new Vector4(0.0f,0.0f,0.5f,0.1f); + public static readonly Vector4 defaultDistanceFadeParams = new Vector4(0.1f,0.01f,0.0f,0.0f); + public static readonly Color lineColor = EditorGUIUtility.isProSkin ? new Color(0.35f,0.35f,0.35f,1.0f) : new Color(0.4f,0.4f,0.4f,1.0f); + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilConstants.cs.meta b/Assets/External/lilToon/Editor/lilConstants.cs.meta new file mode 100644 index 00000000..04d2d986 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilConstants.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bf37c7fc33ca52e4aa3bf227039f0b3b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilDirectoryManager.cs b/Assets/External/lilToon/Editor/lilDirectoryManager.cs new file mode 100644 index 00000000..89d8e811 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilDirectoryManager.cs @@ -0,0 +1,81 @@ +#if UNITY_EDITOR +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace lilToon +{ + internal class lilDirectoryManager + { + public const string editorSettingTempPath = "Temp/lilToonEditorSetting"; + public const string languageSettingTempPath = "Temp/lilToonLanguageSetting"; + public const string versionInfoTempPath = "Temp/lilToonVersion"; + public const string packageListTempPath = "Temp/lilToonPackageList"; + public const string forceOptimizeBuildTempPath = "Temp/lilToonForceOptimizeBuild"; + public const string postBuildTempPath = "Temp/lilToonPostBuild"; + public const string startupTempPath = "Temp/lilToonStartup"; + + #if NET_4_6 + public const string rspPath = "Assets/csc.rsp"; + #else + public const string rspPath = "Assets/mcs.rsp"; + #endif + + public static string GetBaseShaderFolderPath() { return GUIDToPath("d465bb256af2e3a4ca646387f4bd83e7"); } // "Assets/lilToon/BaseShaderResources" + public static string GetEditorFolderPath() { return GUIDToPath("3e73d675b9c1adc4f8b6b8ef01bce51c"); } // "Assets/lilToon/Editor" + public static string GetPresetsFolderPath() { return GUIDToPath("35817d21af2f3134182c4a7e4c07786b"); } // "Assets/lilToon/Presets" + public static string GetEditorPath() { return GUIDToPath("aefa51cbc37d602418a38a02c3b9afb9"); } // "Assets/lilToon/Editor/lilInspector.cs" + public static string GetShaderFolderPath() { return GUIDToPath("ac0a8f602b5e72f458f4914bf08f0269"); } // "Assets/lilToon/Shader" + public static string GetShaderPipelinePath() { return GUIDToPath("32299664512e2e042bbc351c1d46d383"); } // "Assets/lilToon/Shader/Includes/lil_pipeline.hlsl"; + public static string GetShaderCommonPath() { return GUIDToPath("5520e766422958546bbe885a95d5a67e"); } // "Assets/lilToon/Shader/Includes/lil_common.hlsl"; + [System.Obsolete] public static string GetEditorLanguageFileGUID() { return GUIDToPath("a63ad2f5296744a4bad011de744ba8ba"); } // "Assets/lilToon/Editor/Resources/lang.txt" + public static string GetGUIBoxInDarkPath() { return GUIDToPath("bb1313c9ea1425b41b74e98fd04bcbc8"); } // "Assets/lilToon/Editor/Resources/gui_box_inner_dark.guiskin" + public static string GetGUIBoxInLightPath() { return GUIDToPath("f18d71f528511e748887f5e246abcc16"); } // "Assets/lilToon/Editor/Resources/gui_box_inner_light.guiskin" + public static string GetGUIBoxInHalfDarkPath() { return GUIDToPath("a72199a4c9cc3714d8edfbc5d3b13823"); } // "Assets/lilToon/Editor/Resources/gui_box_inner_half_dark.guiskin" + public static string GetGUIBoxInHalfLightPath() { return GUIDToPath("8343038a4a0cbef4d8af45c073520436"); } // "Assets/lilToon/Editor/Resources/gui_box_inner_half_light.guiskin" + public static string GetGUIBoxOutDarkPath() { return GUIDToPath("29f3c01461cd0474eab36bf2e939bb58"); } // "Assets/lilToon/Editor/Resources/gui_box_outer_dark.guiskin" + public static string GetGUIBoxOutLightPath() { return GUIDToPath("16cc103a658d8404894e66dd8f35cb77"); } // "Assets/lilToon/Editor/Resources/gui_box_outer_light.guiskin" + public static string GetGUICustomBoxDarkPath() { return GUIDToPath("45dfb1bafd2c7d34ab453c29c0b1f46e"); } // "Assets/lilToon/Editor/Resources/gui_custom_box_dark.guiskin" + public static string GetGUICustomBoxLightPath() { return GUIDToPath("a1ed8756474bfd34f80fa22e6c43b2e5"); } // "Assets/lilToon/Editor/Resources/gui_custom_box_light.guiskin" + public static string GetCurrentRPPath() { return GUIDToPath("142b3aeca72105442a83089b616e92b8"); } // "Assets/lilToon/Editor/CurrentRP.txt" + public static string GetAvatarEncryptionPath() { return GUIDToPath("f9787bf8ed5154f4b931278945ac8ca1"); } // "Assets/AvaterEncryption"; + public static string GetAvaCryptV2Path() { return GUIDToPath("3d37d2c6de7be1b4182d5f0bfd480365"); } // "com.geotetra.gtavacrypt/package.json"; + public static string GetClusterCreatorKitPath() { return GUIDToPath("6f11c0d5c326e4a6c851aa1c02ff11ee"); } // "ClusterCreatorKit/package.json" + public static string GetMainFolderPath() // "Assets/lilToon" + { + string editorPath = GetEditorFolderPath(); + return editorPath.Substring(0, editorPath.Length - 7); + } + public static string GetShaderSettingPath() { return "ProjectSettings/lilToonSetting.json"; } // "ProjectSettings/lilToonSetting.json" + public static string GetSettingLockPath() { return GetMainFolderPath() + "/SettingLock.json"; } // "Assets/lilToon/SettingLock.json" + public static string[] GetShaderFolderPaths() { return new[] {GetShaderFolderPath()}; } + public static string GetSettingFolderPath() { return GetMainFolderPath(); } + public static string GUIDToPath(string GUID) { return AssetDatabase.GUIDToAssetPath(GUID); } + + public static bool ExistsEncryption() { return !string.IsNullOrEmpty(GetAvatarEncryptionPath()); } + public static bool ExistsAvaCryptV2() { return !string.IsNullOrEmpty(GetAvaCryptV2Path()); } + public static bool ExistsClusterCreatorKit() { return !string.IsNullOrEmpty(GetClusterCreatorKitPath()); } + + public static IEnumerable FindAssetsPath(string filter, string[] folders) + { + return AssetDatabase.FindAssets(filter, folders).Select(id => GUIDToPath(id)); + } + + public static IEnumerable FindAssetsPath(string filter) + { + return AssetDatabase.FindAssets(filter).Select(id => GUIDToPath(id)); + } + + public static IEnumerable FindAssets(string filter, string[] folders) where T : Object + { + return FindAssetsPath(filter, folders).Select(p => AssetDatabase.LoadAssetAtPath(p)); + } + + public static IEnumerable FindAssets(string filter) where T : Object + { + return FindAssetsPath(filter).Select(p => AssetDatabase.LoadAssetAtPath(p)); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilDirectoryManager.cs.meta b/Assets/External/lilToon/Editor/lilDirectoryManager.cs.meta new file mode 100644 index 00000000..72cb4d02 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilDirectoryManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 16ce355c89524144ba07853555caf3af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilEditorGUI.cs b/Assets/External/lilToon/Editor/lilEditorGUI.cs new file mode 100644 index 00000000..9802e769 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilEditorGUI.cs @@ -0,0 +1,997 @@ +#if UNITY_EDITOR +using System; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace lilToon +{ + public class lilEditorGUI + { + public static GUIStyle boxOuter = InitializeBox(4, 4, 2); + public static GUIStyle boxInnerHalf = InitializeBox(4, 2, 2); + public static GUIStyle boxInner = InitializeBox(4, 2, 2); + public static GUIStyle customBox = InitializeBox(6, 4, 4); + public static GUIStyle customToggleFont = new GUIStyle(); + public static GUIStyle wrapLabel = new GUIStyle(); + public static GUIStyle boldLabel = new GUIStyle(); + public static GUIStyle foldout = new GUIStyle(); + public static GUIStyle middleButton = new GUIStyle(){alignment = TextAnchor.MiddleCenter}; + + public static GUIStyle InitializeBox(int border, int margin, int padding) + { + return new GUIStyle + { + border = new RectOffset(border, border, border, border), + margin = new RectOffset(margin, margin, margin, margin), + padding = new RectOffset(padding, padding, padding, padding), + overflow = new RectOffset(0, 0, 0, 0) + }; + } + + public static bool Foldout(string title, bool display) + { + return Foldout(title, "", display); + } + + public static bool Foldout(string title, string help, bool display) + { + var rect = GUILayoutUtility.GetRect(16f, 20f, foldout); + rect.width += 8f; + rect.x -= 8f; + GUI.Box(rect, new GUIContent(title, help), foldout); + + var e = Event.current; + + var toggleRect = new Rect(rect.x + 4f, rect.y + 2f, 13f, 13f); + if(e.type == EventType.Repaint) { + EditorStyles.foldout.Draw(toggleRect, false, false, display, false); + } + + rect.width -= 24; + if(e.type == EventType.MouseDown && rect.Contains(e.mousePosition)) { + display = !display; + e.Use(); + } + + return display; + } + + public static void DrawLine() + { + EditorGUI.DrawRect(EditorGUI.IndentedRect(EditorGUILayout.GetControlRect(false, 1)), lilConstants.lineColor); + } + + public static void DrawWebButton(string text, string URL) + { + var position = EditorGUI.IndentedRect(EditorGUILayout.GetControlRect()); + var icon = EditorGUIUtility.IconContent("BuildSettings.Web.Small"); + icon.text = text; + var style = new GUIStyle(EditorStyles.label){padding = new RectOffset()}; + if(GUI.Button(position, icon, style)){ + Application.OpenURL(URL); + } + } + + public static bool DrawSimpleFoldout(string label, bool condition, GUIStyle style, bool isCustomEditor = true) + { + EditorGUI.indentLevel++; + var position = EditorGUILayout.GetControlRect(); + EditorGUI.LabelField(position, label, style); + EditorGUI.indentLevel--; + + position.x += isCustomEditor ? 0 : 10; + return EditorGUI.Foldout(position, condition, ""); + } + + public static bool DrawSimpleFoldout(string label, bool condition, bool isCustomEditor = true) + { + return DrawSimpleFoldout(label, condition, boldLabel, isCustomEditor); + } + + public static bool DrawSimpleFoldout(MaterialEditor materialEditor, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, bool condition, bool isCustomEditor = true) + { + EditorGUI.indentLevel++; + var position = TexturePropertySingleLine(materialEditor, guiContent, textureName, rgba); + EditorGUI.indentLevel--; + + position.x += isCustomEditor ? 0 : 10; + return EditorGUI.Foldout(position, condition, ""); + } + + public static bool DrawSimpleFoldout(MaterialEditor materialEditor, GUIContent guiContent, MaterialProperty textureName, bool condition, bool isCustomEditor = true) + { + EditorGUI.indentLevel++; + var position = TexturePropertySingleLine(materialEditor, guiContent, textureName); + EditorGUI.indentLevel--; + + position.x += isCustomEditor ? 0 : 10; + return EditorGUI.Foldout(position, condition, ""); + } + + public static void InitializeGUIStyles() + { + wrapLabel = new GUIStyle(GUI.skin.label){wordWrap = true}; + boldLabel = new GUIStyle(GUI.skin.label){fontStyle = FontStyle.Bold}; + foldout = new GUIStyle("ShurikenModuleTitle") + { + font = EditorStyles.label.font, + fontSize = EditorStyles.label.fontSize, + fontStyle = EditorStyles.label.fontStyle, + border = new RectOffset(15, 7, 4, 4), + contentOffset = new Vector2(20f, -2f), + fixedHeight = 22 + }; + if(EditorGUIUtility.isProSkin) + { + boxOuter.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUIBoxOutDarkPath()); + boxInnerHalf.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUIBoxInHalfDarkPath()); + boxInner.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUIBoxInDarkPath()); + customBox.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUICustomBoxDarkPath()); + customToggleFont = EditorStyles.label; + } + else + { + boxOuter.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUIBoxOutLightPath()); + boxInnerHalf.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUIBoxInHalfLightPath()); + boxInner.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUIBoxInLightPath()); + customBox.normal.background = (Texture2D)EditorGUIUtility.Load(lilDirectoryManager.GetGUICustomBoxLightPath()); + customToggleFont = new GUIStyle(); + customToggleFont.normal.textColor = Color.white; + customToggleFont.contentOffset = new Vector2(2f,0f); + } + } + + public static void DrawHelpButton(string helpAnchor) + { + var position = GUILayoutUtility.GetLastRect(); + position.x += position.width - 24; + position.width = 24; + if(GUI.Button(position, EditorGUIUtility.IconContent("_Help"), middleButton)){ + Application.OpenURL(GetLoc("sManualURL") + helpAnchor); + } + } + + public static bool AutoFixHelpBox(string message) + { + GUILayout.BeginHorizontal(EditorStyles.helpBox); + GUILayout.Label(EditorGUIUtility.IconContent("console.warnicon"), GUILayout.ExpandWidth(false)); + GUILayout.Space(-EditorStyles.label.fontSize); + GUILayout.BeginVertical(); + GUILayout.Label(message, EditorStyles.wordWrappedMiniLabel); + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + bool pressed = GUILayout.Button(GetLoc("sFixNow")); + GUILayout.EndHorizontal(); + GUILayout.EndVertical(); + GUILayout.EndHorizontal(); + return pressed; + } + + public static bool Button(string label) + { + if(!CheckPropertyToDraw(label)) return false; + return GUI.Button(EditorGUI.IndentedRect(EditorGUILayout.GetControlRect()), label); + } + + public static bool[] Buttons(string label, params string[] labels) + { + if(!CheckPropertyToDraw(label)) return Enumerable.Repeat(false,labels.Length).ToArray(); + GUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel(label); + var res = labels.Select(l => GUILayout.Button(l)).ToArray(); + GUILayout.EndHorizontal(); + return res; + } + + public static int Popup(string label, int i, params string[] labels) + { + if(CheckPropertyToDraw(label)) return EditorGUILayout.Popup(label, i, labels); + else return i; + } + + public static int IntSlider(string label, int i, int min, int max) + { + if(CheckPropertyToDraw(label)) return EditorGUILayout.IntSlider(label, i, min, max); + else return i; + } + + public static float Slider(string label, float i, float min, float max) + { + if(CheckPropertyToDraw(label)) return EditorGUILayout.Slider(label, i, min, max); + else return i; + } + + public static float FloatField(string label, float f) + { + if(CheckPropertyToDraw(label)) return EditorGUILayout.FloatField(label, f); + else return f; + } + + public static bool Toggle(string label, bool b) + { + if(CheckPropertyToDraw(label)) return EditorGUILayout.Toggle(label, b); + else return b; + } + + public static Vector2 Vector2Field(string label, Vector2 v) + { + if(CheckPropertyToDraw(label)) return EditorGUILayout.Vector2Field(label, v); + else return v; + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Property drawer + #region + public static void LocalizedProperty(MaterialEditor materialEditor, MaterialProperty prop, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(prop)) + materialEditor.ShaderProperty(prop, lilLanguageManager.GetDisplayName(prop)); + } + + public static void LocalizedProperty(MaterialEditor materialEditor, MaterialProperty prop, string label, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(prop)) + { + if(Event.current.alt) + { + if(label.Contains("|")) label = prop.name + label.Substring(label.IndexOf("|")); + else label = prop.name; + } + materialEditor.ShaderProperty(prop, lilLanguageManager.GetDisplayName(label)); + } + } + + public static void LocalizedProperty(MaterialEditor materialEditor, MaterialProperty prop, int indent, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(prop)) + materialEditor.ShaderProperty(prop, lilLanguageManager.GetDisplayName(prop), indent); + } + + public static void LocalizedPropertyColorWithAlpha(MaterialEditor materialEditor, MaterialProperty prop, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(prop)) + { + LocalizedProperty(materialEditor, prop); + DrawColorAsAlpha(prop); + } + } + + public static Rect TexturePropertySingleLine(MaterialEditor materialEditor, GUIContent content, MaterialProperty tex) + { + if(Event.current.alt) content = new GUIContent(tex.name); + return materialEditor.TexturePropertySingleLine(content, tex); + } + + public static Rect TexturePropertySingleLine(MaterialEditor materialEditor, GUIContent content, MaterialProperty tex, MaterialProperty prop) + { + if(Event.current.alt) + { + if(prop == null) content = new GUIContent(tex.name); + else content = new GUIContent(tex.name + ", " + prop.name); + } + return materialEditor.TexturePropertySingleLine(content, tex, prop); + } + + public static void LocalizedPropertyTexture(MaterialEditor materialEditor, GUIContent content, MaterialProperty tex, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(tex) || CheckPropertyToDraw(content)) + TexturePropertySingleLine(materialEditor, content, tex); + } + + public static void LocalizedPropertyTexture(MaterialEditor materialEditor, GUIContent content, MaterialProperty tex, MaterialProperty color, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(tex) || CheckPropertyToDraw(color) || CheckPropertyToDraw(content)) + TexturePropertySingleLine(materialEditor, content, tex, color); + } + + public static void LocalizedPropertyTextureWithAlpha(MaterialEditor materialEditor, GUIContent content, MaterialProperty tex, MaterialProperty color, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(tex) || CheckPropertyToDraw(color) || CheckPropertyToDraw(content)) + { + TexturePropertySingleLine(materialEditor, content, tex, color); + DrawColorAsAlpha(color); + } + } + + public static void LocalizedPropertyAlpha(MaterialProperty prop, bool shouldCheck = true) + { + if(!shouldCheck || CheckPropertyToDraw(prop)) + DrawColorAsAlpha(prop); + } + + public static bool CheckPropertyToDraw(MaterialProperty prop) + { + return string.IsNullOrEmpty(lilToonInspector.edSet.searchKeyWord) || lilLanguageManager.GetDisplayName(prop).Contains(lilToonInspector.edSet.searchKeyWord) || prop.name.Contains(lilToonInspector.edSet.searchKeyWord); + } + + public static bool CheckPropertyToDraw(params MaterialProperty[] props) + { + return string.IsNullOrEmpty(lilToonInspector.edSet.searchKeyWord) || props.Count(prop => lilLanguageManager.GetDisplayName(prop).Contains(lilToonInspector.edSet.searchKeyWord) || prop.name.Contains(lilToonInspector.edSet.searchKeyWord)) > 0; + } + + public static bool CheckPropertyToDraw(GUIContent content) + { + return string.IsNullOrEmpty(lilToonInspector.edSet.searchKeyWord) || + !string.IsNullOrEmpty(content.text) && content.text.Contains(lilToonInspector.edSet.searchKeyWord) || + !string.IsNullOrEmpty(content.tooltip) && content.tooltip.Contains(lilToonInspector.edSet.searchKeyWord); + } + + public static bool CheckPropertyToDraw(string label) + { + return string.IsNullOrEmpty(lilToonInspector.edSet.searchKeyWord) || label.Contains(lilToonInspector.edSet.searchKeyWord); + } + + public static bool CheckPropertyToDraw(params string[] labels) + { + return string.IsNullOrEmpty(lilToonInspector.edSet.searchKeyWord) || labels.Count(l => lilLanguageManager.GetDisplayName(l).Contains(lilToonInspector.edSet.searchKeyWord)) > 0; + } + + public static bool CheckPropertyToDraw() + { + return string.IsNullOrEmpty(lilToonInspector.edSet.searchKeyWord); + } + + public static void UV4Decal(MaterialEditor m_MaterialEditor, MaterialProperty isDecal, MaterialProperty isLeftOnly, MaterialProperty isRightOnly, MaterialProperty shouldCopy, MaterialProperty shouldFlipMirror, MaterialProperty shouldFlipCopy, MaterialProperty tex, MaterialProperty SR, MaterialProperty angle, MaterialProperty decalAnimation, MaterialProperty decalSubParam, MaterialProperty uvMode) + { + if(!CheckPropertyToDraw(isDecal, isLeftOnly, isRightOnly, shouldCopy, shouldFlipMirror, shouldFlipCopy, tex, SR, angle, decalAnimation, decalSubParam, uvMode)) return; + LocalizedProperty(m_MaterialEditor, uvMode); + ConvertGifToAtlas(tex, decalAnimation, decalSubParam, isDecal); + // Toggle decal + EditorGUI.BeginChangeCheck(); + LocalizedProperty(m_MaterialEditor, isDecal); + if(EditorGUI.EndChangeCheck() && isDecal.floatValue == 0.0f) + { + isLeftOnly.floatValue = 0.0f; + isRightOnly.floatValue = 0.0f; + shouldFlipMirror.floatValue = 0.0f; + shouldCopy.floatValue = 0.0f; + shouldFlipCopy.floatValue = 0.0f; + } + + if(isDecal.floatValue == 1.0f) + { + EditorGUI.indentLevel++; + // Mirror mode + // 0 : Normal + // 1 : Flip + // 2 : Left only + // 3 : Right only + // 4 : Right only (Flip) + int mirrorMode = 0; + if(isRightOnly.floatValue == 1.0f) mirrorMode = 3; + if(shouldFlipMirror.floatValue == 1.0f) mirrorMode++; + if(isLeftOnly.floatValue == 1.0f) mirrorMode = 2; + + EditorGUI.BeginChangeCheck(); + string mmlabel = Event.current.alt ? isLeftOnly.name + ", " + isRightOnly.name + ", " + shouldFlipMirror.name : GetLoc("sMirrorMode"); + mirrorMode = Popup(mmlabel,mirrorMode,new string[]{GetLoc("sMirrorModeNormal"),GetLoc("sMirrorModeFlip"),GetLoc("sMirrorModeLeft"),GetLoc("sMirrorModeRight"),GetLoc("sMirrorModeRightFlip")}); + if(EditorGUI.EndChangeCheck()) + { + if(mirrorMode == 0) + { + isLeftOnly.floatValue = 0.0f; + isRightOnly.floatValue = 0.0f; + shouldFlipMirror.floatValue = 0.0f; + } + if(mirrorMode == 1) + { + isLeftOnly.floatValue = 0.0f; + isRightOnly.floatValue = 0.0f; + shouldFlipMirror.floatValue = 1.0f; + } + if(mirrorMode == 2) + { + isLeftOnly.floatValue = 1.0f; + isRightOnly.floatValue = 0.0f; + shouldFlipMirror.floatValue = 0.0f; + } + if(mirrorMode == 3) + { + isLeftOnly.floatValue = 0.0f; + isRightOnly.floatValue = 1.0f; + shouldFlipMirror.floatValue = 0.0f; + } + if(mirrorMode == 4) + { + isLeftOnly.floatValue = 0.0f; + isRightOnly.floatValue = 1.0f; + shouldFlipMirror.floatValue = 1.0f; + } + } + + // Copy mode + // 0 : Normal + // 1 : Symmetry + // 2 : Flip + int copyMode = 0; + if(shouldCopy.floatValue == 1.0f) copyMode = 1; + if(shouldFlipCopy.floatValue == 1.0f) copyMode = 2; + + EditorGUI.BeginChangeCheck(); + string cmlabel = Event.current.alt ? shouldCopy.name + ", " + shouldFlipCopy.name : GetLoc("sCopyMode"); + copyMode = Popup(cmlabel,copyMode,new string[]{GetLoc("sCopyModeNormal"),GetLoc("sCopyModeSymmetry"),GetLoc("sCopyModeFlip")}); + if(EditorGUI.EndChangeCheck()) + { + if(copyMode == 0) + { + shouldCopy.floatValue = 0.0f; + shouldFlipCopy.floatValue = 0.0f; + } + if(copyMode == 1) + { + shouldCopy.floatValue = 1.0f; + shouldFlipCopy.floatValue = 0.0f; + } + if(copyMode == 2) + { + shouldCopy.floatValue = 1.0f; + shouldFlipCopy.floatValue = 1.0f; + } + } + + // Load scale & offset + float scaleX = tex.textureScaleAndOffset.x; + float scaleY = tex.textureScaleAndOffset.y; + float posX = tex.textureScaleAndOffset.z; + float posY = tex.textureScaleAndOffset.w; + + // scale & offset -> scale & position + if(scaleX==0.0f) + { + posX = 0.5f; + scaleX = 0.000001f; + } + else + { + posX = (0.5f - posX) / scaleX; + scaleX = 1.0f / scaleX; + } + + if(scaleY==0.0f) + { + posY = 0.5f; + scaleY = 0.000001f; + } + else + { + posY = (0.5f - posY) / scaleY; + scaleY = 1.0f / scaleY; + } + scaleX = RoundFloat1000000(scaleX); + scaleY = RoundFloat1000000(scaleY); + posX = RoundFloat1000000(posX); + posY = RoundFloat1000000(posY); + + // If uv copy enables, fix position + EditorGUI.BeginChangeCheck(); + if(copyMode > 0) + { + if(posX < 0.5f) posX = 1.0f - posX; + posX = EditorGUILayout.Slider(Event.current.alt ? tex.name + "_ST.z" : GetLoc("sPositionX"), posX, 0.5f, 1.0f); + } + else + { + posX = EditorGUILayout.Slider(Event.current.alt ? tex.name + "_ST.z" : GetLoc("sPositionX"), posX, 0.0f, 1.0f); + } + + // Draw properties + posY = EditorGUILayout.Slider(Event.current.alt ? tex.name + "_ST.w" : GetLoc("sPositionY"), posY, 0.0f, 1.0f); + scaleX = EditorGUILayout.Slider(Event.current.alt ? tex.name + "_ST.x" : GetLoc("sScaleX"), scaleX, -1.0f, 1.0f); + scaleY = EditorGUILayout.Slider(Event.current.alt ? tex.name + "_ST.y" : GetLoc("sScaleY"), scaleY, -1.0f, 1.0f); + if(EditorGUI.EndChangeCheck()) + { + // Avoid division by zero + if(scaleX == 0.0f) scaleX = 0.000001f; + if(scaleY == 0.0f) scaleY = 0.000001f; + + // scale & position -> scale & offset + scaleX = 1.0f / scaleX; + scaleY = 1.0f / scaleY; + posX = (-posX * scaleX) + 0.5f; + posY = (-posY * scaleY) + 0.5f; + + tex.textureScaleAndOffset = new Vector4(scaleX, scaleY, posX, posY); + } + + LocalizedProperty(m_MaterialEditor, angle); + ScrollAndRotateGUI(SR); + EditorGUI.indentLevel--; + LocalizedProperty(m_MaterialEditor, decalAnimation); + LocalizedProperty(m_MaterialEditor, decalSubParam); + } + else + { + UVSettingGUI(m_MaterialEditor, tex); + LocalizedProperty(m_MaterialEditor, angle); + ScrollAndRotateGUI(SR); + } + + if(Button(GetLoc("sReset")) && EditorUtility.DisplayDialog(GetLoc("sDialogResetUV"),GetLoc("sDialogResetUVMes"),GetLoc("sYes"),GetLoc("sNo"))) + { + uvMode.floatValue = 0.0f; + isDecal.floatValue = 0.0f; + isLeftOnly.floatValue = 0.0f; + isRightOnly.floatValue = 0.0f; + shouldCopy.floatValue = 0.0f; + shouldFlipMirror.floatValue = 0.0f; + shouldFlipCopy.floatValue = 0.0f; + angle.floatValue = 0.0f; + decalAnimation.vectorValue = new Vector4(1.0f,1.0f,1.0f,30.0f); + decalSubParam.vectorValue = new Vector4(1.0f,1.0f,0.01f,1.0f); + } + } + + private static void ScrollAndRotateGUI(MaterialProperty prop) + { + if(!CheckPropertyToDraw(prop)) return; + var scroll = new Vector2(prop.vectorValue.x, prop.vectorValue.y); + float angle = Radian2Degree(prop.vectorValue.z); + float rotate = RoundFloat1000000(prop.vectorValue.w / Mathf.PI * 0.5f); + + EditorGUI.BeginChangeCheck(); + + var positionVec2 = EditorGUILayout.GetControlRect(); + + // Scroll label + float labelWidth = EditorGUIUtility.labelWidth; + var labelRect = new Rect(positionVec2.x, positionVec2.y, labelWidth, positionVec2.height); + EditorGUI.PrefixLabel(labelRect, new GUIContent(Event.current.alt ? prop.name + "_ST.xy" : GetLoc("sScroll"))); + + // Copy & Reset indent + int indentBuf = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + + // Scroll + var vecRect = new Rect(positionVec2.x + labelWidth, positionVec2.y, positionVec2.width - labelWidth, positionVec2.height); + scroll = EditorGUI.Vector2Field(vecRect, GUIContent.none, scroll); + + // Revert indent + EditorGUI.indentLevel = indentBuf; + + // Rotate + rotate = EditorGUI.FloatField(EditorGUILayout.GetControlRect(), Event.current.alt ? prop.name + "_ST.w" : GetLoc("sRotate"), rotate); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(scroll.x, scroll.y, Degree2Radian(angle), rotate * Mathf.PI * 2.0f); + } + } + + public static void ToneCorrectionGUI(MaterialEditor m_MaterialEditor, MaterialProperty hsvg) + { + LocalizedProperty(m_MaterialEditor, hsvg); + // Reset + if(Button(GetLoc("sReset"))) + { + hsvg.vectorValue = lilConstants.defaultHSVG; + } + } + + public static void ToneCorrectionGUI(MaterialEditor m_MaterialEditor, MaterialProperty hsvg, int indent) + { + EditorGUI.indentLevel += indent; + ToneCorrectionGUI(m_MaterialEditor, hsvg); + EditorGUI.indentLevel -= indent; + } + + public static void DrawVectorAs4Float(MaterialProperty prop, string label0, string label1, string label2, string label3) + { + if(!CheckPropertyToDraw(prop)) return; + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float param4 = prop.vectorValue.w; + if(Event.current.alt) + { + label0 = prop.name + ".x"; + label1 = prop.name + ".y"; + label2 = prop.name + ".z"; + label3 = prop.name + ".w"; + } + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + param1 = EditorGUILayout.FloatField(label0, param1); + param2 = EditorGUILayout.FloatField(label1, param2); + param3 = EditorGUILayout.FloatField(label2, param3); + param4 = EditorGUILayout.FloatField(label3, param4); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, param4); + } + } + + public static void DrawColorAsAlpha(MaterialProperty prop, string label) + { + if(!CheckPropertyToDraw(label)) return; + float alpha = prop.colorValue.a; + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + alpha = EditorGUILayout.Slider(Event.current.alt ? prop.name + ".a" : label, alpha, 0.0f, 1.0f); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.colorValue = new Color(prop.colorValue.r, prop.colorValue.g, prop.colorValue.b, alpha); + } + } + + public static void DrawColorAsAlpha(MaterialProperty prop) + { + DrawColorAsAlpha(prop, GetLoc("sAlpha")); + } + + public static void RemoveUnusedPropertiesGUI(Material material) + { + if(Button(GetLoc("sRemoveUnused"))) + { + Undo.RecordObject(material, "Remove unused properties"); + lilMaterialUtils.RemoveUnusedTexture(material, material.shader.name.Contains("Lite")); + } + } + + public static void SetAlphaIsTransparencyGUI(MaterialProperty tex) + { + if(CheckPropertyToDraw(tex) && tex.textureValue is Texture2D && !((Texture2D)tex.textureValue).alphaIsTransparency && AutoFixHelpBox(GetLoc("sNotAlphaIsTransparency"))) + { + string path = AssetDatabase.GetAssetPath(tex.textureValue); + var textureImporter = (TextureImporter)AssetImporter.GetAtPath(path); + textureImporter.alphaIsTransparency = true; + AssetDatabase.ImportAsset(path); + } + } + + public static void UVSettingGUI(MaterialEditor m_MaterialEditor, MaterialProperty uvst) + { + if(!CheckPropertyToDraw(uvst)) return; + m_MaterialEditor.TextureScaleOffsetProperty(uvst); + } + + public static void UVSettingGUI(MaterialEditor m_MaterialEditor, MaterialProperty uvst, MaterialProperty uvsr) + { + if(!CheckPropertyToDraw(uvst, uvsr)) return; + EditorGUILayout.LabelField(GetLoc("sUVSetting"), boldLabel); + UVSettingGUI(m_MaterialEditor, uvst); + LocalizedProperty(m_MaterialEditor, uvsr); + } + + public static void InvBorderGUI(MaterialProperty prop) + { + if(!CheckPropertyToDraw(prop)) return; + float f = prop.floatValue; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + f = 1.0f - EditorGUILayout.Slider(Event.current.alt ? prop.name : GetLoc("sBorder"), 1.0f - f, 0.0f, 1.0f); + EditorGUI.showMixedValue = false; + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = f; + } + } + + public static void MinusRangeGUI(MaterialProperty prop, string label) + { + if(!CheckPropertyToDraw(prop)) return; + float f = -prop.floatValue; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + f = EditorGUILayout.Slider(Event.current.alt ? prop.name : label, f, 0.0f, 1.0f); + EditorGUI.showMixedValue = false; + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = -f; + } + } + + public static void BlendSettingGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, string labelName, MaterialProperty srcRGB, MaterialProperty dstRGB, MaterialProperty srcA, MaterialProperty dstA, MaterialProperty opRGB, MaterialProperty opA) + { + if(!CheckPropertyToDraw(srcRGB, dstRGB, srcA, dstA, opRGB, opA)) return; + isShow = DrawSimpleFoldout(labelName, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + LocalizedProperty(m_MaterialEditor, srcRGB); + LocalizedProperty(m_MaterialEditor, dstRGB); + LocalizedProperty(m_MaterialEditor, srcA); + LocalizedProperty(m_MaterialEditor, dstA); + LocalizedProperty(m_MaterialEditor, opRGB); + LocalizedProperty(m_MaterialEditor, opA); + EditorGUI.indentLevel--; + } + } + + public static void TextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(textureName)) return; + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + UVSettingGUI(m_MaterialEditor, textureName); + EditorGUI.indentLevel--; + } + } + + public static void TextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(textureName, rgba)) return; + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, rgba, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + UVSettingGUI(m_MaterialEditor, textureName); + EditorGUI.indentLevel--; + } + } + + public static void TextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty uvMode, string sUVMode) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(textureName, rgba, uvMode)) return; + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, rgba, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + UVSettingGUI(m_MaterialEditor, textureName); + LocalizedProperty(m_MaterialEditor, uvMode, sUVMode); + EditorGUI.indentLevel--; + } + } + + public static void TextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty scrollRotate) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(textureName, rgba, scrollRotate)) return; + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, rgba, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + UVSettingGUI(m_MaterialEditor, textureName); + LocalizedProperty(m_MaterialEditor, scrollRotate, GetLoc("sScroll")); + EditorGUI.indentLevel--; + } + } + + public static void TextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty scrollRotate, bool useCustomUV, bool useUVAnimation) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(textureName, rgba, scrollRotate)) return; + if(useCustomUV) + { + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, rgba, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + if(useUVAnimation) UVSettingGUI(m_MaterialEditor, textureName, scrollRotate); + else UVSettingGUI(m_MaterialEditor, textureName); + EditorGUI.indentLevel--; + } + } + else + { + TexturePropertySingleLine(m_MaterialEditor, guiContent, textureName, rgba); + } + } + + public static void TextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty scrollRotate, MaterialProperty uvMode, bool useCustomUV, bool useUVAnimation) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(textureName, rgba, scrollRotate, uvMode)) return; + if(useCustomUV) + { + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, rgba, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + if(useUVAnimation) UVSettingGUI(m_MaterialEditor, textureName, scrollRotate); + else UVSettingGUI(m_MaterialEditor, textureName); + LocalizedProperty(m_MaterialEditor, uvMode); + EditorGUI.indentLevel--; + } + } + else + { + TexturePropertySingleLine(m_MaterialEditor, guiContent, textureName, rgba); + } + } + + public static void MatCapTextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(blendUV1, zRotCancel, perspective, vrParallaxStrength)) return; + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + UVSettingGUI(m_MaterialEditor, textureName); + LocalizedProperty(m_MaterialEditor, blendUV1); + LocalizedProperty(m_MaterialEditor, zRotCancel); + LocalizedProperty(m_MaterialEditor, perspective); + LocalizedProperty(m_MaterialEditor, vrParallaxStrength); + EditorGUI.indentLevel--; + } + } + + public static void MatCapTextureGUI(MaterialEditor m_MaterialEditor, bool isCustomEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) + { + if(!CheckPropertyToDraw(guiContent) && !CheckPropertyToDraw(blendUV1, zRotCancel, perspective, vrParallaxStrength)) return; + isShow = DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, rgba, isShow, isCustomEditor); + if(isShow) + { + EditorGUI.indentLevel++; + UVSettingGUI(m_MaterialEditor, textureName); + LocalizedProperty(m_MaterialEditor, blendUV1); + LocalizedProperty(m_MaterialEditor, zRotCancel); + LocalizedProperty(m_MaterialEditor, perspective); + LocalizedProperty(m_MaterialEditor, vrParallaxStrength); + + var buttons = Buttons("UV Preset", "MatCap", "AngelRing"); + if(buttons[0]) ApplyMatCapUVPreset(false, blendUV1, zRotCancel, perspective, vrParallaxStrength); + if(buttons[1]) ApplyMatCapUVPreset(true, blendUV1, zRotCancel, perspective, vrParallaxStrength); + EditorGUI.indentLevel--; + } + } + + public static void ApplyMatCapUVPreset(bool isAngelRing, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) + { + if(isAngelRing) + { + blendUV1.vectorValue = new Vector4(0.0f, 1.0f, 0.0f, 0.0f); + zRotCancel.floatValue = 1.0f; + perspective.floatValue = 0.0f; + vrParallaxStrength.floatValue = 0.0f; + } + else + { + blendUV1.vectorValue = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + zRotCancel.floatValue = 1.0f; + perspective.floatValue = 1.0f; + vrParallaxStrength.floatValue = 1.0f; + } + } + + public static void BitEditor8(MaterialProperty prop, string label) + { + int val = (int)prop.floatValue; + val = IntClamp(val, 0, 255); + bool[] b = { + val / 1 % 2 != 0, + val / 2 % 2 != 0, + val / 4 % 2 != 0, + val / 8 % 2 != 0, + val / 16 % 2 != 0, + val / 32 % 2 != 0, + val / 64 % 2 != 0, + val / 128 % 2 != 0 + }; + EditorGUI.BeginChangeCheck(); + var position = EditorGUILayout.GetControlRect(); + var labelRect = new Rect(position.x, position.y, EditorGUIUtility.labelWidth, position.height); + var toggleRect = new Rect(labelRect.x + labelRect.width + 2, position.y, position.height, position.height); + EditorGUI.PrefixLabel(labelRect, new GUIContent(label)); + b[7] = EditorGUI.Toggle(toggleRect,b[7]); toggleRect.x += position.height; + b[6] = EditorGUI.Toggle(toggleRect,b[6]); toggleRect.x += position.height; + b[5] = EditorGUI.Toggle(toggleRect,b[5]); toggleRect.x += position.height; + b[4] = EditorGUI.Toggle(toggleRect,b[4]); toggleRect.x += position.height; + b[3] = EditorGUI.Toggle(toggleRect,b[3]); toggleRect.x += position.height; + b[2] = EditorGUI.Toggle(toggleRect,b[2]); toggleRect.x += position.height; + b[1] = EditorGUI.Toggle(toggleRect,b[1]); toggleRect.x += position.height; + b[0] = EditorGUI.Toggle(toggleRect,b[0]); toggleRect.x += position.height; + if(EditorGUI.EndChangeCheck()) + { + val = 0; + if(b[0]) val += 1; + if(b[1]) val += 2; + if(b[2]) val += 4; + if(b[3]) val += 8; + if(b[4]) val += 16; + if(b[5]) val += 32; + if(b[6]) val += 64; + if(b[7]) val += 128; + prop.floatValue = val; + } + + EditorGUI.BeginChangeCheck(); + var numRect = new Rect(toggleRect.x, position.y, position.width - toggleRect.x + position.height + 2, position.height); + val = EditorGUI.IntField(numRect, val); + if(EditorGUI.EndChangeCheck()) + { + val = IntClamp(val, 0, 255); + prop.floatValue = val; + } + } + + public static void ConvertGifToAtlas(MaterialProperty tex, MaterialProperty decalAnimation, MaterialProperty decalSubParam, MaterialProperty isDecal) + { + #if SYSTEM_DRAWING + if(tex.textureValue != null && AssetDatabase.GetAssetPath(tex.textureValue).EndsWith(".gif", StringComparison.OrdinalIgnoreCase) && Button(GetLoc("sConvertGif"))) + { + int frameCount, loopXY, duration; + float xScale, yScale; + string savePath = lilTextureUtils.ConvertGifToAtlas(tex.textureValue, out frameCount, out loopXY, out duration, out xScale, out yScale); + + tex.textureValue = AssetDatabase.LoadAssetAtPath(savePath); + decalAnimation.vectorValue = new Vector4(loopXY,loopXY,frameCount,100.0f/duration); + decalSubParam.vectorValue = new Vector4(xScale,yScale,decalSubParam.vectorValue.z,decalSubParam.vectorValue.w); + isDecal.floatValue = 1.0f; + } + #endif + } + + public static void RenderQueueField(MaterialEditor materialEditor) + { + if(!CheckPropertyToDraw("Render Queue")) return; + materialEditor.RenderQueueField(); + } + + public static void EnableInstancingField(MaterialEditor materialEditor) + { + if(!CheckPropertyToDraw("Enable GPU Instancing")) return; + materialEditor.EnableInstancingField(); + } + + public static void DoubleSidedGIField(MaterialEditor materialEditor) + { + if(!CheckPropertyToDraw("Double Sided Global Illumination")) return; + materialEditor.DoubleSidedGIField(); + } + + public static void LightmapEmissionFlagsProperty(MaterialEditor materialEditor) + { + if(!CheckPropertyToDraw("Global Illumination")) return; + #if UNITY_2019_1_OR_NEWER + materialEditor.LightmapEmissionFlagsProperty(0, true, true); + #else + materialEditor.LightmapEmissionFlagsProperty(0, true); + #endif + } + + private static int IntClamp(int val, int min, int max) + { + return val < min ? min : (val > max ? max : val); + } + + public static float GetRemapMinValue(float scale, float offset) + { + return RoundFloat1000000(Mathf.Clamp(-offset / scale, -0.01f, 1.01f)); + } + + public static float GetRemapMaxValue(float scale, float offset) + { + return RoundFloat1000000(Mathf.Clamp((1.0f - offset) / scale, -0.01f, 1.01f)); + } + + public static float GetRemapScaleValue(float min, float max) + { + return 1.0f / (max - min); + } + + public static float GetRemapOffsetValue(float min, float max) + { + return min / (min - max); + } + + public static float Radian2Degree(float val) + { + return RoundFloat1000000(val / Mathf.PI * 180.0f); + } + + public static float Degree2Radian(float val) + { + return val * Mathf.PI / 180.0f; + } + + public static float RoundFloat1000000(float val) + { + return Mathf.Floor(val * 1000000.0f + 0.5f) * 0.000001f; + } + + public static bool EditorButton(string label) + { + return GUI.Button(EditorGUI.IndentedRect(EditorGUILayout.GetControlRect()), label); + } + #endregion + + private static string GetLoc(string value) { return lilLanguageManager.GetLoc(value); } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilEditorGUI.cs.meta b/Assets/External/lilToon/Editor/lilEditorGUI.cs.meta new file mode 100644 index 00000000..44ed4874 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilEditorGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cb188ab387b43d64fb32f4b171886a16 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilEditorParameters.cs b/Assets/External/lilToon/Editor/lilEditorParameters.cs new file mode 100644 index 00000000..24f34730 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilEditorParameters.cs @@ -0,0 +1,14 @@ +#if UNITY_EDITOR +using UnityEditor; + +namespace lilToon +{ + public class lilEditorParameters : ScriptableSingleton + { + public bool forceOptimize; + public bool startupEnd; + public string modifiedShaders; + public string versionInfo; + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilEditorParameters.cs.meta b/Assets/External/lilToon/Editor/lilEditorParameters.cs.meta new file mode 100644 index 00000000..9d04222d --- /dev/null +++ b/Assets/External/lilToon/Editor/lilEditorParameters.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8e60a27750570b048921935a96422d1f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilEnumeration.cs b/Assets/External/lilToon/Editor/lilEnumeration.cs new file mode 100644 index 00000000..eb3cd11b --- /dev/null +++ b/Assets/External/lilToon/Editor/lilEnumeration.cs @@ -0,0 +1,99 @@ +#if UNITY_EDITOR +namespace lilToon +{ + public enum EditorMode + { + Simple, + Advanced, + Preset, + Settings + } + + public enum RenderingMode + { + Opaque, + Cutout, + Transparent, + Refraction, + RefractionBlur, + Fur, + FurCutout, + FurTwoPass, + Gem + } + + public enum TransparentMode + { + Normal, + OnePass, + TwoPass + } + + [System.Obsolete] + public enum BlendMode + { + Alpha, + Add, + Screen, + Mul + } + + public enum LightingPreset + { + Default, + SemiMonochrome + } + + public enum PropertyBlock + { + Base, + Lighting, + UV, + MainColor, + MainColor1st, + MainColor2nd, + MainColor3rd, + AlphaMask, + Shadow, + RimShade, + Emission, + Emission1st, + Emission2nd, + NormalMap, + NormalMap1st, + NormalMap2nd, + Anisotropy, + Reflections, + Reflection, + MatCaps, + MatCap1st, + MatCap2nd, + RimLight, + Glitter, + Backlight, + Gem, + Outline, + Parallax, + DistanceFade, + AudioLink, + Dissolve, + IDMask, + UDIMDiscard, + Refraction, + Fur, + Encryption, + Stencil, + Rendering, + Tessellation, + Other + } + + public enum lilRenderPipeline + { + BRP, + LWRP, + URP, + HDRP + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilEnumeration.cs.meta b/Assets/External/lilToon/Editor/lilEnumeration.cs.meta new file mode 100644 index 00000000..299c4d85 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilEnumeration.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 602ca744f7854714490591fa69f178e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector.meta b/Assets/External/lilToon/Editor/lilInspector.meta new file mode 100644 index 00000000..a0193533 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 81312ac3ad59b7341a1a150e37e1f89e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs b/Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs new file mode 100644 index 00000000..0ef67b94 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs @@ -0,0 +1,761 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + //------------------------------------------------------------------------------------------------------------------------------ + // Bake + #region + private void TextureBake(Material material, int bakeType) + { + //bool shouldBake1st = (bakeType == 1 || bakeType == 4) && mainTex.textureValue != null; + bool shouldNotBakeColor = (bakeType == 1 || bakeType == 4) && mainColor.colorValue == Color.white && mainTexHSVG.vectorValue == lilConstants.defaultHSVG && mainGradationStrength.floatValue == 0.0; + bool cannotBake1st = mainTex.textureValue == null; + bool shouldNotBake2nd = (bakeType == 2 || bakeType == 5) && useMain2ndTex.floatValue == 0.0; + bool shouldNotBake3rd = (bakeType == 3 || bakeType == 6) && useMain3rdTex.floatValue == 0.0; + bool shouldNotBakeAll = bakeType == 0 && mainColor.colorValue == Color.white && mainTexHSVG.vectorValue == lilConstants.defaultHSVG && mainGradationStrength.floatValue == 0.0 && useMain2ndTex.floatValue == 0.0 && useMain3rdTex.floatValue == 0.0; + if(cannotBake1st) + { + EditorUtility.DisplayDialog(GetLoc("sDialogCannotBake"), GetLoc("sDialogSetMainTex"), GetLoc("sOK")); + } + else if(shouldNotBakeColor) + { + EditorUtility.DisplayDialog(GetLoc("sDialogNoNeedBake"), GetLoc("sDialogNoChange"), GetLoc("sOK")); + } + else if(shouldNotBake2nd) + { + EditorUtility.DisplayDialog(GetLoc("sDialogNoNeedBake"), GetLoc("sDialogNotUse2nd"), GetLoc("sOK")); + } + else if(shouldNotBake3rd) + { + EditorUtility.DisplayDialog(GetLoc("sDialogNoNeedBake"), GetLoc("sDialogNotUse3rd"), GetLoc("sOK")); + } + else if(shouldNotBakeAll) + { + EditorUtility.DisplayDialog(GetLoc("sDialogNoNeedBake"), GetLoc("sDialogNotUseAll"), GetLoc("sOK")); + } + else + { + bool bake2nd = (bakeType == 0 || bakeType == 2 || bakeType == 5) && useMain2ndTex.floatValue != 0.0; + bool bake3rd = (bakeType == 0 || bakeType == 3 || bakeType == 6) && useMain3rdTex.floatValue != 0.0; + // run bake + var bufMainTexture = mainTex.textureValue as Texture2D; + var hsvgMaterial = new Material(ltsbaker); + + string path; + + var srcTexture = new Texture2D(2, 2); + var srcMain2 = new Texture2D(2, 2); + var srcMain3 = new Texture2D(2, 2); + var srcMask2 = new Texture2D(2, 2); + var srcMask3 = new Texture2D(2, 2); + + hsvgMaterial.SetColor(mainColor.name, mainColor.colorValue); + hsvgMaterial.SetVector(mainTexHSVG.name, mainTexHSVG.vectorValue); + hsvgMaterial.SetFloat(mainGradationStrength.name, mainGradationStrength.floatValue); + hsvgMaterial.SetTexture(mainGradationTex.name, mainGradationTex.textureValue); + hsvgMaterial.SetTexture(mainColorAdjustMask.name, mainColorAdjustMask.textureValue); + + path = AssetDatabase.GetAssetPath(material.GetTexture(mainTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + } + + if(bake2nd) + { + hsvgMaterial.SetFloat(useMain2ndTex.name, useMain2ndTex.floatValue); + hsvgMaterial.SetColor(mainColor2nd.name, mainColor2nd.colorValue); + hsvgMaterial.SetFloat(main2ndTexAngle.name, main2ndTexAngle.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsDecal.name, main2ndTexIsDecal.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsLeftOnly.name, main2ndTexIsLeftOnly.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsRightOnly.name, main2ndTexIsRightOnly.floatValue); + hsvgMaterial.SetFloat(main2ndTexShouldCopy.name, main2ndTexShouldCopy.floatValue); + hsvgMaterial.SetFloat(main2ndTexShouldFlipMirror.name, main2ndTexShouldFlipMirror.floatValue); + hsvgMaterial.SetFloat(main2ndTexShouldFlipCopy.name, main2ndTexShouldFlipCopy.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsMSDF.name, main2ndTexIsMSDF.floatValue); + hsvgMaterial.SetFloat(main2ndTexBlendMode.name, main2ndTexBlendMode.floatValue); + hsvgMaterial.SetFloat(main2ndTexAlphaMode.name, main2ndTexAlphaMode.floatValue); + hsvgMaterial.SetTextureOffset(main2ndTex.name, material.GetTextureOffset(main2ndTex.name)); + hsvgMaterial.SetTextureScale(main2ndTex.name, material.GetTextureScale(main2ndTex.name)); + hsvgMaterial.SetTextureOffset(main2ndBlendMask.name, material.GetTextureOffset(main2ndBlendMask.name)); + hsvgMaterial.SetTextureScale(main2ndBlendMask.name, material.GetTextureScale(main2ndBlendMask.name)); + + path = AssetDatabase.GetAssetPath(material.GetTexture(main2ndTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMain2, path); + hsvgMaterial.SetTexture(main2ndTex.name, srcMain2); + } + else + { + hsvgMaterial.SetTexture(main2ndTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(material.GetTexture(main2ndBlendMask.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMask2, path); + hsvgMaterial.SetTexture(main2ndBlendMask.name, srcMask2); + } + else + { + hsvgMaterial.SetTexture(main2ndBlendMask.name, Texture2D.whiteTexture); + } + } + + if(bake3rd) + { + hsvgMaterial.SetFloat(useMain3rdTex.name, useMain3rdTex.floatValue); + hsvgMaterial.SetColor(mainColor3rd.name, mainColor3rd.colorValue); + hsvgMaterial.SetFloat(main3rdTexAngle.name, main3rdTexAngle.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsDecal.name, main3rdTexIsDecal.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsLeftOnly.name, main3rdTexIsLeftOnly.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsRightOnly.name, main3rdTexIsRightOnly.floatValue); + hsvgMaterial.SetFloat(main3rdTexShouldCopy.name, main3rdTexShouldCopy.floatValue); + hsvgMaterial.SetFloat(main3rdTexShouldFlipMirror.name, main3rdTexShouldFlipMirror.floatValue); + hsvgMaterial.SetFloat(main3rdTexShouldFlipCopy.name, main3rdTexShouldFlipCopy.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsMSDF.name, main3rdTexIsMSDF.floatValue); + hsvgMaterial.SetFloat(main3rdTexBlendMode.name, main3rdTexBlendMode.floatValue); + hsvgMaterial.SetFloat(main3rdTexAlphaMode.name, main3rdTexAlphaMode.floatValue); + hsvgMaterial.SetTextureOffset(main3rdTex.name, material.GetTextureOffset(main3rdTex.name)); + hsvgMaterial.SetTextureScale(main3rdTex.name, material.GetTextureScale(main3rdTex.name)); + hsvgMaterial.SetTextureOffset(main3rdBlendMask.name, material.GetTextureOffset(main3rdBlendMask.name)); + hsvgMaterial.SetTextureScale(main3rdBlendMask.name, material.GetTextureScale(main3rdBlendMask.name)); + + path = AssetDatabase.GetAssetPath(material.GetTexture(main3rdTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMain3, path); + hsvgMaterial.SetTexture(main3rdTex.name, srcMain3); + } + else + { + hsvgMaterial.SetTexture(main3rdTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(material.GetTexture(main3rdBlendMask.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMask3, path); + hsvgMaterial.SetTexture(main3rdBlendMask.name, srcMask3); + } + else + { + hsvgMaterial.SetTexture(main3rdBlendMask.name, Texture2D.whiteTexture); + } + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial); + + outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, mainTex.name); + if(outTexture != mainTex.textureValue) + { + mainTexHSVG.vectorValue = lilConstants.defaultHSVG; + mainColor.colorValue = Color.white; + mainGradationStrength.floatValue = 0.0f; + mainGradationTex.textureValue = null; + if(bake2nd) + { + useMain2ndTex.floatValue = 0.0f; + main2ndTex.textureValue = null; + } + if(bake3rd) + { + useMain3rdTex.floatValue = 0.0f; + main3rdTex.textureValue = null; + } + CopyTextureSetting(bufMainTexture, outTexture); + } + + material.SetTexture(mainTex.name, outTexture); + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + Object.DestroyImmediate(srcMain2); + Object.DestroyImmediate(srcMain3); + Object.DestroyImmediate(srcMask2); + Object.DestroyImmediate(srcMask3); + } + } + + private Texture AutoBakeMainTexture(Material material) + { + bool shouldNotBakeAll = mainColor.colorValue == Color.white && mainTexHSVG.vectorValue == lilConstants.defaultHSVG && mainGradationStrength.floatValue == 0.0 && useMain2ndTex.floatValue == 0.0 && useMain3rdTex.floatValue == 0.0; + if(!shouldNotBakeAll && EditorUtility.DisplayDialog(GetLoc("sDialogRunBake"), GetLoc("sDialogBakeMain"), GetLoc("sYes"), GetLoc("sNo"))) + { + bool bake2nd = useMain2ndTex.floatValue != 0.0; + bool bake3rd = useMain3rdTex.floatValue != 0.0; + // run bake + var bufMainTexture = mainTex.textureValue as Texture2D; + var hsvgMaterial = new Material(ltsbaker); + + string path; + + var srcTexture = new Texture2D(2, 2); + var srcMain2 = new Texture2D(2, 2); + var srcMain3 = new Texture2D(2, 2); + var srcMask2 = new Texture2D(2, 2); + var srcMask3 = new Texture2D(2, 2); + + hsvgMaterial.SetColor(mainColor.name, Color.white); + hsvgMaterial.SetVector(mainTexHSVG.name, mainTexHSVG.vectorValue); + hsvgMaterial.SetFloat(mainGradationStrength.name, mainGradationStrength.floatValue); + hsvgMaterial.SetTexture(mainGradationTex.name, mainGradationTex.textureValue); + hsvgMaterial.SetTexture(mainColorAdjustMask.name, mainColorAdjustMask.textureValue); + + path = AssetDatabase.GetAssetPath(material.GetTexture(mainTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + } + + if(bake2nd) + { + hsvgMaterial.SetFloat(useMain2ndTex.name, useMain2ndTex.floatValue); + hsvgMaterial.SetColor(mainColor2nd.name, mainColor2nd.colorValue); + hsvgMaterial.SetFloat(main2ndTexAngle.name, main2ndTexAngle.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsDecal.name, main2ndTexIsDecal.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsLeftOnly.name, main2ndTexIsLeftOnly.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsRightOnly.name, main2ndTexIsRightOnly.floatValue); + hsvgMaterial.SetFloat(main2ndTexShouldCopy.name, main2ndTexShouldCopy.floatValue); + hsvgMaterial.SetFloat(main2ndTexShouldFlipMirror.name, main2ndTexShouldFlipMirror.floatValue); + hsvgMaterial.SetFloat(main2ndTexShouldFlipCopy.name, main2ndTexShouldFlipCopy.floatValue); + hsvgMaterial.SetFloat(main2ndTexIsMSDF.name, main2ndTexIsMSDF.floatValue); + hsvgMaterial.SetFloat(main2ndTexBlendMode.name, main2ndTexBlendMode.floatValue); + hsvgMaterial.SetFloat(main2ndTexAlphaMode.name, main2ndTexAlphaMode.floatValue); + hsvgMaterial.SetTextureOffset(main2ndTex.name, material.GetTextureOffset(main2ndTex.name)); + hsvgMaterial.SetTextureScale(main2ndTex.name, material.GetTextureScale(main2ndTex.name)); + hsvgMaterial.SetTextureOffset(main2ndBlendMask.name, material.GetTextureOffset(main2ndBlendMask.name)); + hsvgMaterial.SetTextureScale(main2ndBlendMask.name, material.GetTextureScale(main2ndBlendMask.name)); + + path = AssetDatabase.GetAssetPath(material.GetTexture(main2ndTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMain2, path); + hsvgMaterial.SetTexture(main2ndTex.name, srcMain2); + } + else + { + hsvgMaterial.SetTexture(main2ndTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(material.GetTexture(main2ndBlendMask.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMask2, path); + hsvgMaterial.SetTexture(main2ndBlendMask.name, srcMask2); + } + else + { + hsvgMaterial.SetTexture(main2ndBlendMask.name, Texture2D.whiteTexture); + } + } + + if(bake3rd) + { + hsvgMaterial.SetFloat(useMain3rdTex.name, useMain3rdTex.floatValue); + hsvgMaterial.SetColor(mainColor3rd.name, mainColor3rd.colorValue); + hsvgMaterial.SetFloat(main3rdTexAngle.name, main3rdTexAngle.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsDecal.name, main3rdTexIsDecal.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsLeftOnly.name, main3rdTexIsLeftOnly.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsRightOnly.name, main3rdTexIsRightOnly.floatValue); + hsvgMaterial.SetFloat(main3rdTexShouldCopy.name, main3rdTexShouldCopy.floatValue); + hsvgMaterial.SetFloat(main3rdTexShouldFlipMirror.name, main3rdTexShouldFlipMirror.floatValue); + hsvgMaterial.SetFloat(main3rdTexShouldFlipCopy.name, main3rdTexShouldFlipCopy.floatValue); + hsvgMaterial.SetFloat(main3rdTexIsMSDF.name, main3rdTexIsMSDF.floatValue); + hsvgMaterial.SetFloat(main3rdTexBlendMode.name, main3rdTexBlendMode.floatValue); + hsvgMaterial.SetFloat(main3rdTexAlphaMode.name, main3rdTexAlphaMode.floatValue); + hsvgMaterial.SetTextureOffset(main3rdTex.name, material.GetTextureOffset(main3rdTex.name)); + hsvgMaterial.SetTextureScale(main3rdTex.name, material.GetTextureScale(main3rdTex.name)); + hsvgMaterial.SetTextureOffset(main3rdBlendMask.name, material.GetTextureOffset(main3rdBlendMask.name)); + hsvgMaterial.SetTextureScale(main3rdBlendMask.name, material.GetTextureScale(main3rdBlendMask.name)); + + path = AssetDatabase.GetAssetPath(material.GetTexture(main3rdTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMain3, path); + hsvgMaterial.SetTexture(main3rdTex.name, srcMain3); + } + else + { + hsvgMaterial.SetTexture(main3rdTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(material.GetTexture(main3rdBlendMask.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMask3, path); + hsvgMaterial.SetTexture(main3rdBlendMask.name, srcMask3); + } + else + { + hsvgMaterial.SetTexture(main3rdBlendMask.name, Texture2D.whiteTexture); + } + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial); + + outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, mainTex.name); + if(outTexture != mainTex.textureValue) + { + CopyTextureSetting(bufMainTexture, outTexture); + } + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + Object.DestroyImmediate(srcMain2); + Object.DestroyImmediate(srcMain3); + Object.DestroyImmediate(srcMask2); + Object.DestroyImmediate(srcMask3); + + return outTexture; + } + else + { + return mainTex.textureValue; + } + } + + private Texture AutoBakeShadowTexture(Material material, Texture bakedMainTex, int shadowType = 0, bool shouldShowDialog = true) + { + bool shouldNotBakeAll = useShadow.floatValue == 0.0 && shadowColor.colorValue == Color.white && shadowColorTex.textureValue == null && shadowStrengthMask.textureValue == null; + bool shouldBake = true; + if(shouldShowDialog) shouldBake = EditorUtility.DisplayDialog(GetLoc("sDialogRunBake"), GetLoc("sDialogBakeShadow"), GetLoc("sYes"), GetLoc("sNo")); + if(!shouldNotBakeAll && shouldBake) + { + // run bake + var bufMainTexture = bakedMainTex as Texture2D; + var hsvgMaterial = new Material(ltsbaker); + + string path; + + var srcTexture = new Texture2D(2, 2); + var srcMain2 = new Texture2D(2, 2); + var srcMask2 = new Texture2D(2, 2); + + hsvgMaterial.SetColor(mainColor.name, Color.white); + hsvgMaterial.SetVector(mainTexHSVG.name, lilConstants.defaultHSVG); + hsvgMaterial.SetFloat(useMain2ndTex.name, 1.0f); + hsvgMaterial.SetFloat(useMain3rdTex.name, 1.0f); + hsvgMaterial.SetColor(mainColor3rd.name, new Color(1.0f,1.0f,1.0f,shadowMainStrength.floatValue)); + hsvgMaterial.SetFloat(main3rdTexBlendMode.name, 3.0f); + if(shadowType == 2) + { + hsvgMaterial.SetColor(mainColor2nd.name, new Color(shadow2ndColor.colorValue.r, shadow2ndColor.colorValue.g, shadow2ndColor.colorValue.b, shadow2ndColor.colorValue.a * shadowStrength.floatValue)); + hsvgMaterial.SetFloat(main2ndTexBlendMode.name, 0.0f); + hsvgMaterial.SetFloat(main2ndTexAlphaMode.name, 0.0f); + path = AssetDatabase.GetAssetPath(material.GetTexture(shadow2ndColorTex.name)); + } + else if(shadowType == 3) + { + hsvgMaterial.SetColor(mainColor3rd.name, new Color(shadow3rdColor.colorValue.r, shadow3rdColor.colorValue.g, shadow3rdColor.colorValue.b, shadow3rdColor.colorValue.a * shadowStrength.floatValue)); + hsvgMaterial.SetFloat(main3rdTexBlendMode.name, 0.0f); + hsvgMaterial.SetFloat(main3rdTexAlphaMode.name, 0.0f); + path = AssetDatabase.GetAssetPath(material.GetTexture(shadow3rdColorTex.name)); + } + else + { + hsvgMaterial.SetColor(mainColor2nd.name, new Color(shadowColor.colorValue.r, shadowColor.colorValue.g, shadowColor.colorValue.b, shadowStrength.floatValue)); + hsvgMaterial.SetFloat(main2ndTexBlendMode.name, 0.0f); + hsvgMaterial.SetFloat(main2ndTexAlphaMode.name, 0.0f); + path = AssetDatabase.GetAssetPath(material.GetTexture(shadowColorTex.name)); + } + + bool existsShadowTex = !string.IsNullOrEmpty(path); + if(existsShadowTex) + { + lilTextureUtils.LoadTexture(ref srcMain2, path); + hsvgMaterial.SetTexture(main2ndTex.name, srcMain2); + } + + path = AssetDatabase.GetAssetPath(bakedMainTex); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + hsvgMaterial.SetTexture(main3rdTex.name, srcTexture); + if(!existsShadowTex) hsvgMaterial.SetTexture(main2ndTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + hsvgMaterial.SetTexture(main3rdTex.name, Texture2D.whiteTexture); + if(!existsShadowTex) hsvgMaterial.SetTexture(main2ndTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(material.GetTexture(shadowStrengthMask.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMask2, path); + hsvgMaterial.SetTexture(main2ndBlendMask.name, srcMask2); + hsvgMaterial.SetTexture(main3rdBlendMask.name, srcMask2); + } + else + { + hsvgMaterial.SetTexture(main2ndBlendMask.name, Texture2D.whiteTexture); + hsvgMaterial.SetTexture(main3rdBlendMask.name, Texture2D.whiteTexture); + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial); + + if(shadowType == 0) outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, mainTex.name); + if(shadowType == 1) outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, mainTex.name, "_shadow_1st"); + if(shadowType == 2) outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, mainTex.name, "_shadow_2nd"); + if(outTexture != mainTex.textureValue) + { + CopyTextureSetting(bufMainTexture, outTexture); + } + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + Object.DestroyImmediate(srcMain2); + Object.DestroyImmediate(srcMask2); + + return outTexture; + } + else + { + return (Texture2D)mainTex.textureValue; + } + } + + private Texture AutoBakeMatCap(Material material) + { + bool shouldNotBakeAll = matcapColor.colorValue == Color.white; + if(!shouldNotBakeAll && EditorUtility.DisplayDialog(GetLoc("sDialogRunBake"), GetLoc("sDialogBakeMatCap"), GetLoc("sYes"), GetLoc("sNo"))) + { + // run bake + var bufMainTexture = matcapTex.textureValue as Texture2D; + var hsvgMaterial = new Material(ltsbaker); + + string path; + + var srcTexture = new Texture2D(2, 2); + + hsvgMaterial.SetColor(mainColor.name, matcapColor.colorValue); + hsvgMaterial.SetVector(mainTexHSVG.name, lilConstants.defaultHSVG); + + path = AssetDatabase.GetAssetPath(material.GetTexture(matcapTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial); + + outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, matcapTex.name); + if(outTexture != matcapTex.textureValue) + { + CopyTextureSetting(bufMainTexture, outTexture); + } + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + + return outTexture; + } + else + { + return matcapTex.textureValue; + } + } + + private Texture AutoBakeTriMask(Material material) + { + bool shouldNotBakeAll = matcapBlendMask.textureValue == null && rimColorTex.textureValue == null && emissionBlendMask.textureValue == null; + if(!shouldNotBakeAll && EditorUtility.DisplayDialog(GetLoc("sDialogRunBake"), GetLoc("sDialogBakeTriMask"), GetLoc("sYes"), GetLoc("sNo"))) + { + // run bake + var bufMainTexture = mainTex.textureValue as Texture2D; + var hsvgMaterial = new Material(ltsbaker); + + string path; + + var srcTexture = new Texture2D(2, 2); + var srcMain2 = new Texture2D(2, 2); + var srcMain3 = new Texture2D(2, 2); + + hsvgMaterial.EnableKeyword("_TRIMASK"); + + path = AssetDatabase.GetAssetPath(matcapBlendMask.textureValue); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(rimColorTex.textureValue); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMain2, path); + hsvgMaterial.SetTexture(main2ndTex.name, srcMain2); + } + else + { + hsvgMaterial.SetTexture(main2ndTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(emissionBlendMask.textureValue); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcMain3, path); + hsvgMaterial.SetTexture(main3rdTex.name, srcMain3); + } + else + { + hsvgMaterial.SetTexture(main3rdTex.name, Texture2D.whiteTexture); + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial, bufMainTexture); + + outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, mainTex.name); + if(outTexture != mainTex.textureValue && mainTex.textureValue != null) + { + CopyTextureSetting(bufMainTexture, outTexture); + } + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + + return outTexture; + } + else + { + return null; + } + } + + private Texture AutoBakeAlphaMask(Material material) + { + // run bake + var bufMainTexture = mainTex.textureValue as Texture2D; + var hsvgMaterial = new Material(ltsbaker); + + string path; + + var srcTexture = new Texture2D(2, 2); + var srcAlphaMask = new Texture2D(2, 2); + + hsvgMaterial.EnableKeyword("_ALPHAMASK"); + hsvgMaterial.SetColor(mainColor.name, Color.white); + hsvgMaterial.SetVector(mainTexHSVG.name, lilConstants.defaultHSVG); + hsvgMaterial.SetFloat(alphaMaskMode.name, alphaMaskMode.floatValue); + hsvgMaterial.SetFloat(alphaMaskScale.name, alphaMaskScale.floatValue); + hsvgMaterial.SetFloat(alphaMaskValue.name, alphaMaskValue.floatValue); + + path = AssetDatabase.GetAssetPath(bufMainTexture); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + } + + path = AssetDatabase.GetAssetPath(material.GetTexture(alphaMask.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcAlphaMask, path); + hsvgMaterial.SetTexture(alphaMask.name, srcAlphaMask); + } + else + { + return (Texture2D)mainTex.textureValue; + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial); + + outTexture = lilTextureUtils.SaveTextureToPng(outTexture, bufMainTexture); + if(outTexture != bufMainTexture) + { + CopyTextureSetting(bufMainTexture, outTexture); + string savePath = AssetDatabase.GetAssetPath(outTexture); + var textureImporter = (TextureImporter)AssetImporter.GetAtPath(savePath); + textureImporter.alphaIsTransparency = true; + AssetDatabase.ImportAsset(savePath); + } + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + + return outTexture; + } + + private Texture AutoBakeOutlineTexture(Material material) + { + bool shouldNotBakeOutline = outlineTex.textureValue == null || outlineTexHSVG.vectorValue == lilConstants.defaultHSVG; + if(!shouldNotBakeOutline && EditorUtility.DisplayDialog(GetLoc("sDialogRunBake"), GetLoc("sDialogBakeOutline"), GetLoc("sYes"), GetLoc("sNo"))) + { + // run bake + var bufMainTexture = outlineTex.textureValue as Texture2D; + var hsvgMaterial = new Material(ltsbaker); + + string path; + + var srcTexture = new Texture2D(2, 2); + + hsvgMaterial.SetColor(mainColor.name, Color.white); + hsvgMaterial.SetVector(mainTexHSVG.name, outlineTexHSVG.vectorValue); + + path = AssetDatabase.GetAssetPath(material.GetTexture(outlineTex.name)); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial); + + outTexture = lilTextureUtils.SaveTextureToPng(material, outTexture, mainTex.name); + if(outTexture != mainTex.textureValue) + { + CopyTextureSetting(bufMainTexture, outTexture); + } + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + + return outTexture; + } + else + { + return outlineTex.textureValue; + } + } + + private void AutoBakeColoredMask(Material material, MaterialProperty masktex, MaterialProperty maskcolor, string propName) + { + if(propName.Contains("Shadow")) + { + int shadowType = propName.Contains("2nd") ? 2 : 1; + shadowType = propName.Contains("3rd") ? 3 : shadowType; + AutoBakeShadowTexture(material, mainTex.textureValue, shadowType, false); + return; + } + + var hsvgMaterial = new Material(ltsbaker); + hsvgMaterial.SetColor(mainColor.name, maskcolor.colorValue); + + var bufMainTexture = Texture2D.whiteTexture; + if(masktex != null && masktex.textureValue is Texture2D) bufMainTexture = (Texture2D)masktex.textureValue; + string path = ""; + + var srcTexture = new Texture2D(2, 2); + + if(masktex != null) path = AssetDatabase.GetAssetPath(bufMainTexture); + if(!string.IsNullOrEmpty(path)) + { + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture(mainTex.name, srcTexture); + } + else + { + hsvgMaterial.SetTexture(mainTex.name, Texture2D.whiteTexture); + } + + Texture2D outTexture = null; + RunBake(ref outTexture, srcTexture, hsvgMaterial); + + if(!string.IsNullOrEmpty(path)) path = Path.GetDirectoryName(path) + "/" + material.name + "_" + propName; + else path = "Assets/" + material.name + "_" + propName; + outTexture = lilTextureUtils.SaveTextureToPng(outTexture, path); + if(outTexture != bufMainTexture) + { + CopyTextureSetting(bufMainTexture, outTexture); + } + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + } + + public static void RunBake(ref Texture2D outTexture, Texture2D srcTexture, Material material, Texture2D referenceTexture = null) + { + int width = 4096; + int height = 4096; + if(referenceTexture != null) + { + width = referenceTexture.width; + height = referenceTexture.height; + } + else if(srcTexture != null) + { + width = srcTexture.width; + height = srcTexture.height; + } + outTexture = new Texture2D(width, height); + + var bufRT = RenderTexture.active; + var dstTexture = RenderTexture.GetTemporary(width, height); + Graphics.Blit(srcTexture, dstTexture, material); + RenderTexture.active = dstTexture; + outTexture.ReadPixels(new Rect(0, 0, width, height), 0, 0); + outTexture.Apply(); + RenderTexture.active = bufRT; + RenderTexture.ReleaseTemporary(dstTexture); + } + + private void CopyTextureSetting(Texture2D fromTexture, Texture2D toTexture) + { + if(fromTexture == null || toTexture == null) return; + string fromPath = AssetDatabase.GetAssetPath(fromTexture); + string toPath = AssetDatabase.GetAssetPath(toTexture); + var fromTextureImporter = (TextureImporter)AssetImporter.GetAtPath(fromPath); + var toTextureImporter = (TextureImporter)AssetImporter.GetAtPath(toPath); + if(fromTextureImporter == null || toTextureImporter == null) return; + + var fromTextureImporterSettings = new TextureImporterSettings(); + fromTextureImporter.ReadTextureSettings(fromTextureImporterSettings); + toTextureImporter.SetTextureSettings(fromTextureImporterSettings); + toTextureImporter.SetPlatformTextureSettings(fromTextureImporter.GetDefaultPlatformTextureSettings()); + AssetDatabase.ImportAsset(toPath); + } + #endregion + + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs.meta new file mode 100644 index 00000000..ba651f17 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilEditorTextureBaker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 71d4f5005de5f6b4bac872500ce4d027 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs b/Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs new file mode 100644 index 00000000..f98a2727 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs @@ -0,0 +1,215 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + + //------------------------------------------------------------------------------------------------------------------------------ + // Editor variables + public class lilToonEditorSetting : ScriptableSingleton + { + public EditorMode editorMode = EditorMode.Simple; + public bool isShowBase = false; + public bool isShowPrePreset = false; + public bool isShowMainUV = false; + public bool isShowMain = false; + public bool isShowMainTone = false; + public bool isShowShadow = false; + public bool isShowShadowAO = false; + public bool isShowRimShade = false; + public bool isShowBump = false; + public bool isShowReflections = false; + public bool isShowEmission = false; + public bool isShowEmissionMap = false; + public bool isShowEmissionBlendMask = false; + public bool isShowEmission2ndMap = false; + public bool isShowEmission2ndBlendMask = false; + public bool isShowMatCapUV = false; + public bool isShowMatCap2ndUV = false; + public bool isShowParallax = false; + public bool isShowDistanceFade = false; + public bool isShowAudioLink = false; + public bool isShowDissolve = false; + public bool isShowMain2ndDissolveMask = false; + public bool isShowMain2ndDissolveNoiseMask = false; + public bool isShowMain3rdDissolveMask = false; + public bool isShowMain3rdDissolveNoiseMask = false; + public bool isShowBumpMap = false; + public bool isShowBump2ndMap = false; + public bool isShowBump2ndScaleMask = false; + public bool isShowAnisotropyTangentMap = false; + public bool isShowAnisotropyScaleMask = false; + public bool isShowSmoothnessTex = false; + public bool isShowMetallicGlossMap = false; + public bool isShowBacklight = false; + public bool isShowBacklightColorTex = false; + public bool isShowReflectionColorTex = false; + public bool isShowMatCap = false; + public bool isShowMatCapBlendMask = false; + public bool isShowMatCapBumpMap = false; + public bool isShowMatCap2ndBlendMask = false; + public bool isShowMatCap2ndBumpMap = false; + public bool isShowRim = false; + public bool isShowRimColorTex = false; + public bool isShowGlitter = false; + public bool isShowGlitterColorTex = false; + public bool isShowGlitterShapeTex = false; + public bool isShowGem = false; + public bool isShowAudioLinkMask = false; + public bool isShowDissolveMask = false; + public bool isShowDissolveNoiseMask = false; + public bool isShowIDMask = false; + public bool isShowUDIMDiscard = false; + public bool isShowEncryption = false; + public bool isShowStencil = false; + public bool isShowOutline = false; + public bool isShowOutlineMap = false; + public bool isShowRefraction = false; + public bool isShowFur = false; + public bool isShowTess = false; + public bool isShowRendering = false; + public bool isShowLightBake = false; + public bool isShowOptimization = false; + public bool isShowBlend = false; + public bool isShowBlendAdd = false; + public bool isShowBlendPre = false; + public bool isShowBlendAddPre = false; + public bool isShowBlendOutline = false; + public bool isShowBlendAddOutline = false; + public bool isShowBlendFur = false; + public bool isShowBlendAddFur = false; + public bool isShowWebPages = false; + public bool isShowHelpPages = false; + public bool isShowLightingSettings = false; + public bool isShowShaderSetting = false; + public bool isShowOptimizationSetting = false; + public bool isShowDefaultValueSetting = false; + public bool isShowVRChat = false; + public bool isAlphaMaskModeAdvanced = false; + public bool[] isShowCategorys = new bool[(int)lilPresetCategory.Other+1]{false,false,false,false,false,false,false}; + public string searchKeyWord = ""; + } + + [Serializable] + public class lilToonVersion + { + public string latest_vertion_name; + public int latest_vertion_value; + } + + public struct PropertyBlockData + { + public PropertyBlock propertyBlock; + public bool shouldCopyTex; + } + + public static lilToonPreset[] presets; + public static lilToonEditorSetting edSet { get { return lilToonEditorSetting.instance; } } + protected static MaterialEditor m_MaterialEditor; + protected static RenderingMode renderingModeBuf; + protected static TransparentMode transparentModeBuf; + protected static bool isLite = false; + protected static bool isCutout = false; + protected static bool isTransparent = false; + protected static bool isOutl = false; + protected static bool isRefr = false; + protected static bool isBlur = false; + protected static bool isFur = false; + protected static bool isStWr = false; + protected static bool isTess = false; + protected static bool isGem = false; + protected static bool isFakeShadow = false; + protected static bool isOnePass = false; + protected static bool isTwoPass = false; + protected static bool isMulti = false; + protected static bool isUseAlpha = false; + protected static bool isShowRenderMode = true; + + private Material[] materials; + private static lilToonSetting shaderSetting; + private static readonly lilToonVersion latestVersion = new lilToonVersion{latest_vertion_name = "", latest_vertion_value = 0}; + private static readonly Dictionary copiedProperties = new Dictionary(); + private static bool isCustomEditor = false; + private static bool isMultiVariants = false; + private readonly Gradient mainGrad = new Gradient(); + private readonly Gradient emiGrad = new Gradient(); + private readonly Gradient emi2Grad = new Gradient(); + + protected static GUIStyle boxOuter { get { return lilEditorGUI.boxOuter ; } private set { lilEditorGUI.boxOuter = value; }} + protected static GUIStyle boxInnerHalf { get { return lilEditorGUI.boxInnerHalf ; } private set { lilEditorGUI.boxInnerHalf = value; }} + protected static GUIStyle boxInner { get { return lilEditorGUI.boxInner ; } private set { lilEditorGUI.boxInner = value; }} + protected static GUIStyle customBox { get { return lilEditorGUI.customBox ; } private set { lilEditorGUI.customBox = value; }} + protected static GUIStyle customToggleFont { get { return lilEditorGUI.customToggleFont; } private set { lilEditorGUI.customToggleFont = value; }} + protected static GUIStyle wrapLabel { get { return lilEditorGUI.wrapLabel ; } private set { lilEditorGUI.wrapLabel = value; }} + protected static GUIStyle boldLabel { get { return lilEditorGUI.boldLabel ; } private set { lilEditorGUI.boldLabel = value; }} + protected static GUIStyle foldout { get { return lilEditorGUI.foldout ; } private set { lilEditorGUI.foldout = value; }} + protected static GUIStyle middleButton { get { return lilEditorGUI.middleButton ; } private set { lilEditorGUI.middleButton = value; }} + + protected static string sMainColorBranch { get { return lilLanguageManager.sMainColorBranch ; } private set { lilLanguageManager.sMainColorBranch = value; } } + protected static string sCullModes { get { return lilLanguageManager.sCullModes ; } private set { lilLanguageManager.sCullModes = value; } } + protected static string sBlendModes { get { return lilLanguageManager.sBlendModes ; } private set { lilLanguageManager.sBlendModes = value; } } + protected static string sAlphaModes { get { return lilLanguageManager.sAlphaModes ; } private set { lilLanguageManager.sAlphaModes = value; } } + protected static string sAlphaMaskModes { get { return lilLanguageManager.sAlphaMaskModes ; } private set { lilLanguageManager.sAlphaMaskModes = value; } } + protected static string blinkSetting { get { return lilLanguageManager.blinkSetting ; } private set { lilLanguageManager.blinkSetting = value; } } + protected static string sDistanceFadeSetting { get { return lilLanguageManager.sDistanceFadeSetting ; } private set { lilLanguageManager.sDistanceFadeSetting = value; } } + protected static string sDistanceFadeSettingMode { get { return lilLanguageManager.sDistanceFadeSettingMode ; } private set { lilLanguageManager.sDistanceFadeSettingMode = value; } } + protected static string sDissolveParams { get { return lilLanguageManager.sDissolveParams ; } private set { lilLanguageManager.sDissolveParams = value; } } + protected static string sDissolveParamsMode { get { return lilLanguageManager.sDissolveParamsMode ; } private set { lilLanguageManager.sDissolveParamsMode = value; } } + protected static string sDissolveParamsOther { get { return lilLanguageManager.sDissolveParamsOther ; } private set { lilLanguageManager.sDissolveParamsOther = value; } } + protected static string sGlitterParams1 { get { return lilLanguageManager.sGlitterParams1 ; } private set { lilLanguageManager.sGlitterParams1 = value; } } + protected static string sGlitterParams2 { get { return lilLanguageManager.sGlitterParams2 ; } private set { lilLanguageManager.sGlitterParams2 = value; } } + protected static string sTransparentMode { get { return lilLanguageManager.sTransparentMode ; } private set { lilLanguageManager.sTransparentMode = value; } } + protected static string sOutlineVertexColorUsages { get { return lilLanguageManager.sOutlineVertexColorUsages ; } private set { lilLanguageManager.sOutlineVertexColorUsages = value; } } + protected static string sShadowColorTypes { get { return lilLanguageManager.sShadowColorTypes ; } private set { lilLanguageManager.sShadowColorTypes = value; } } + protected static string sShadowMaskTypes { get { return lilLanguageManager.sShadowMaskTypes ; } private set { lilLanguageManager.sShadowMaskTypes = value; } } + protected static string[] sRenderingModeList { get { return lilLanguageManager.sRenderingModeList ; } private set { lilLanguageManager.sRenderingModeList = value; } } + protected static string[] sRenderingModeListLite { get { return lilLanguageManager.sRenderingModeListLite ; } private set { lilLanguageManager.sRenderingModeListLite = value; } } + protected static string[] sTransparentModeList { get { return lilLanguageManager.sTransparentModeList ; } private set { lilLanguageManager.sTransparentModeList = value; } } + protected static string[] sBlendModeList { get { return lilLanguageManager.sBlendModeList ; } private set { lilLanguageManager.sBlendModeList = value; } } + protected static GUIContent mainColorRGBAContent { get { return lilLanguageManager.mainColorRGBAContent ; } private set { lilLanguageManager.mainColorRGBAContent = value; } } + protected static GUIContent colorRGBAContent { get { return lilLanguageManager.colorRGBAContent ; } private set { lilLanguageManager.colorRGBAContent = value; } } + protected static GUIContent colorAlphaRGBAContent { get { return lilLanguageManager.colorAlphaRGBAContent ; } private set { lilLanguageManager.colorAlphaRGBAContent = value; } } + protected static GUIContent maskBlendContent { get { return lilLanguageManager.maskBlendContent ; } private set { lilLanguageManager.maskBlendContent = value; } } + protected static GUIContent maskBlendRGBContent { get { return lilLanguageManager.maskBlendRGBContent ; } private set { lilLanguageManager.maskBlendRGBContent = value; } } + protected static GUIContent maskBlendRGBAContent { get { return lilLanguageManager.maskBlendRGBAContent ; } private set { lilLanguageManager.maskBlendRGBAContent = value; } } + protected static GUIContent colorMaskRGBAContent { get { return lilLanguageManager.colorMaskRGBAContent ; } private set { lilLanguageManager.colorMaskRGBAContent = value; } } + protected static GUIContent alphaMaskContent { get { return lilLanguageManager.alphaMaskContent ; } private set { lilLanguageManager.alphaMaskContent = value; } } + protected static GUIContent ditherContent { get { return lilLanguageManager.ditherContent ; } private set { lilLanguageManager.ditherContent = value; } } + protected static GUIContent maskStrengthContent { get { return lilLanguageManager.maskStrengthContent ; } private set { lilLanguageManager.maskStrengthContent = value; } } + protected static GUIContent normalMapContent { get { return lilLanguageManager.normalMapContent ; } private set { lilLanguageManager.normalMapContent = value; } } + protected static GUIContent noiseMaskContent { get { return lilLanguageManager.noiseMaskContent ; } private set { lilLanguageManager.noiseMaskContent = value; } } + protected static GUIContent matcapContent { get { return lilLanguageManager.matcapContent ; } private set { lilLanguageManager.matcapContent = value; } } + protected static GUIContent gradationContent { get { return lilLanguageManager.gradationContent ; } private set { lilLanguageManager.gradationContent = value; } } + protected static GUIContent gradSpeedContent { get { return lilLanguageManager.gradSpeedContent ; } private set { lilLanguageManager.gradSpeedContent = value; } } + protected static GUIContent smoothnessContent { get { return lilLanguageManager.smoothnessContent ; } private set { lilLanguageManager.smoothnessContent = value; } } + protected static GUIContent metallicContent { get { return lilLanguageManager.metallicContent ; } private set { lilLanguageManager.metallicContent = value; } } + protected static GUIContent parallaxContent { get { return lilLanguageManager.parallaxContent ; } private set { lilLanguageManager.parallaxContent = value; } } + protected static GUIContent audioLinkMaskContent { get { return lilLanguageManager.audioLinkMaskContent ; } private set { lilLanguageManager.audioLinkMaskContent = value; } } + protected static GUIContent audioLinkMaskSpectrumContent { get { return lilLanguageManager.audioLinkMaskSpectrumContent ; } private set { lilLanguageManager.audioLinkMaskSpectrumContent = value; } } + protected static GUIContent customMaskContent { get { return lilLanguageManager.customMaskContent ; } private set { lilLanguageManager.customMaskContent = value; } } + protected static GUIContent shadow1stColorRGBAContent { get { return lilLanguageManager.shadow1stColorRGBAContent ; } private set { lilLanguageManager.shadow1stColorRGBAContent = value; } } + protected static GUIContent shadow2ndColorRGBAContent { get { return lilLanguageManager.shadow2ndColorRGBAContent ; } private set { lilLanguageManager.shadow2ndColorRGBAContent = value; } } + protected static GUIContent shadow3rdColorRGBAContent { get { return lilLanguageManager.shadow3rdColorRGBAContent ; } private set { lilLanguageManager.shadow3rdColorRGBAContent = value; } } + protected static GUIContent blurMaskRGBContent { get { return lilLanguageManager.blurMaskRGBContent ; } private set { lilLanguageManager.blurMaskRGBContent = value; } } + protected static GUIContent shadowAOMapContent { get { return lilLanguageManager.shadowAOMapContent ; } private set { lilLanguageManager.shadowAOMapContent = value; } } + protected static GUIContent widthMaskContent { get { return lilLanguageManager.widthMaskContent ; } private set { lilLanguageManager.widthMaskContent = value; } } + protected static GUIContent lengthMaskContent { get { return lilLanguageManager.lengthMaskContent ; } private set { lilLanguageManager.lengthMaskContent = value; } } + protected static GUIContent triMaskContent { get { return lilLanguageManager.triMaskContent ; } private set { lilLanguageManager.triMaskContent = value; } } + protected static GUIContent cubemapContent { get { return lilLanguageManager.cubemapContent ; } private set { lilLanguageManager.cubemapContent = value; } } + protected static GUIContent audioLinkLocalMapContent { get { return lilLanguageManager.audioLinkLocalMapContent ; } private set { lilLanguageManager.audioLinkLocalMapContent = value; } } + protected static GUIContent gradationMapContent { get { return lilLanguageManager.gradationMapContent ; } private set { lilLanguageManager.gradationMapContent = value; } } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs.meta new file mode 100644 index 00000000..f10c23e6 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilEditorVariables.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79e62e714458dab4c8719cd1d603adfd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs b/Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs new file mode 100644 index 00000000..fbc8536b --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs @@ -0,0 +1,397 @@ +#if !LILTOON_VRCSDK3_AVATARS && !LILTOON_VRCSDK3_WORLDS && VRC_SDK_VRCSDK3 + #if UDON + #define LILTOON_VRCSDK3_WORLDS + #else + #define LILTOON_VRCSDK3_AVATARS + #endif +#endif +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + + //------------------------------------------------------------------------------------------------------------------------------ + // GUI + #region + + // For custom shader + public static bool Foldout(string title, bool display) { return lilEditorGUI.Foldout(title, display); } + public static bool Foldout(string title, string help, bool display) { return lilEditorGUI.Foldout(title, help, display); } + public static void DrawLine() { lilEditorGUI.DrawLine(); } + + private static void ToggleGUI(string label, ref bool value) { value = EditorGUILayout.ToggleLeft(label, value); } + private void OpenHelpPage(object helpAnchor) { Application.OpenURL(GetLoc("sManualURL") + helpAnchor); } + + private static void DrawWebPages() + { + VersionCheck(); + var labelStyle = new GUIStyle(GUI.skin.label){fontStyle = FontStyle.Bold}; + string versionLabel = "lilToon " + lilConstants.currentVersionName; + if(latestVersion != null && latestVersion.latest_vertion_name != null && latestVersion.latest_vertion_value > lilConstants.currentVersionValue) + { + versionLabel = "[Update] lilToon " + lilConstants.currentVersionName + " -> " + latestVersion.latest_vertion_name; + labelStyle.normal.textColor = Color.red; + } + + edSet.isShowWebPages = lilEditorGUI.DrawSimpleFoldout(versionLabel, edSet.isShowWebPages, labelStyle, isCustomEditor); + if(edSet.isShowWebPages) + { + EditorGUI.indentLevel++; + lilEditorGUI.DrawWebButton("BOOTH", lilConstants.boothURL); + lilEditorGUI.DrawWebButton("GitHub", lilConstants.githubURL); + EditorGUI.indentLevel--; + } + } + + private static void VersionCheck() + { + if(string.IsNullOrEmpty(latestVersion.latest_vertion_name)) + { + if(!string.IsNullOrEmpty(lilEditorParameters.instance.versionInfo)) + { + if( + !string.IsNullOrEmpty(lilEditorParameters.instance.versionInfo) && + lilEditorParameters.instance.versionInfo.Contains("latest_vertion_name") && + lilEditorParameters.instance.versionInfo.Contains("latest_vertion_value") + ) + { + EditorJsonUtility.FromJsonOverwrite(lilEditorParameters.instance.versionInfo, latestVersion); + return; + } + } + latestVersion.latest_vertion_name = lilConstants.currentVersionName; + latestVersion.latest_vertion_value = lilConstants.currentVersionValue; + return; + } + } + + private static void DrawHelpPages() + { + edSet.isShowHelpPages = lilEditorGUI.DrawSimpleFoldout(GetLoc("sHelp"), edSet.isShowHelpPages, isCustomEditor); + if(edSet.isShowHelpPages) + { + EditorGUI.indentLevel++; + lilEditorGUI.DrawWebButton(GetLoc("sCommonProblems"), GetLoc("sReadmeURL") + GetLoc("sReadmeAnchorProblem")); + EditorGUI.indentLevel--; + } + } + + private static void DrawShaderTypeWarn(Material material) + { + if(!isMultiVariants && material.shader.name.Contains("Overlay") && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpSelectOverlay"))) + { + material.shader = lts; + } + } + + private static void SelectEditorMode() + { + string[] sEditorModeList = {GetLoc("sEditorModeSimple"),GetLoc("sEditorModeAdvanced"),GetLoc("sEditorModePreset"),GetLoc("sEditorModeShaderSetting")}; + edSet.editorMode = (EditorMode)GUILayout.Toolbar((int)edSet.editorMode, sEditorModeList); + } + + private void DrawMenuButton(string helpAnchor, PropertyBlock propertyBlock) + { + var position = GUILayoutUtility.GetLastRect(); + position.x += position.width - 24; + position.width = 24; + + if(GUI.Button(position, EditorGUIUtility.IconContent("_Popup"), middleButton)) + { + var menu = new GenericMenu(); + menu.AddItem(new GUIContent(GetLoc("sCopy")), false, CopyProperties, propertyBlock); + menu.AddItem(new GUIContent(GetLoc("sPaste")), false, PasteProperties, new PropertyBlockData{propertyBlock = propertyBlock, shouldCopyTex = false}); + menu.AddItem(new GUIContent(GetLoc("sPasteWithTexture")), false, PasteProperties, new PropertyBlockData{propertyBlock = propertyBlock, shouldCopyTex = true}); + #if UNITY_2019_3_OR_NEWER + menu.AddItem(new GUIContent(GetLoc("sReset")), false, ResetProperties, propertyBlock); + #endif + menu.AddItem(new GUIContent(GetLoc("sOpenManual")), false, OpenHelpPage, helpAnchor); + menu.ShowAsContext(); + } + } + + private void DrawVRCFallbackGUI(Material material) + { + #if VRC_SDK_VRCSDK2 || LILTOON_VRCSDK3_AVATARS || LILTOON_VRCSDK3_WORLDS + edSet.isShowVRChat = lilEditorGUI.Foldout("VRChat", "VRChat", edSet.isShowVRChat); + if(edSet.isShowVRChat) + { + EditorGUILayout.BeginVertical(boxOuter); + string tag = material.GetTag("VRCFallback", false); + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = m_MaterialEditor.targets.Where(obj => obj is Material).Any(obj => tag != ((Material)obj).GetTag("VRCFallback", false)); + bool shouldSetTag = EditorGUI.ToggleLeft(EditorGUILayout.GetControlRect(), "Custom Safety Fallback", !string.IsNullOrEmpty(tag), customToggleFont); + if(shouldSetTag) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + string[] sFallbackShaderTypes = {"Unlit", "Standard", "VertexLit", "Toon", "Particle", "Sprite", "Matcap", "MobileToon", "Hidden"}; + string[] sFallbackRenderTypes = {"Opaque", "Cutout", "Transparent", "Fade"}; + string[] sFallbackCullTypes = {"Default", "DoubleSided"}; + + int fallbackShaderType = tag.Contains("Standard") ? 1 : 0; + fallbackShaderType = tag.Contains("VertexLit") ? 2 : fallbackShaderType; + fallbackShaderType = tag.Contains("Toon") ? 3 : fallbackShaderType; + fallbackShaderType = tag.Contains("Particle") ? 4 : fallbackShaderType; + fallbackShaderType = tag.Contains("Sprite") ? 5 : fallbackShaderType; + fallbackShaderType = tag.Contains("Matcap") ? 6 : fallbackShaderType; + fallbackShaderType = tag.Contains("MobileToon") ? 7 : fallbackShaderType; + fallbackShaderType = tag.Contains("Hidden") ? 8 : fallbackShaderType; + + int fallbackRenderType = tag.Contains("Cutout") ? 1 : 0; + fallbackRenderType = tag.Contains("Transparent") ? 2 : fallbackRenderType; + fallbackRenderType = tag.Contains("Fade") ? 3 : fallbackRenderType; + + int fallbackCullType = tag.Contains("DoubleSided") ? 1 : 0; + + fallbackShaderType = lilEditorGUI.Popup("Shader Type", fallbackShaderType, sFallbackShaderTypes); + fallbackRenderType = lilEditorGUI.Popup("Rendering Mode", fallbackRenderType, sFallbackRenderTypes); + fallbackCullType = lilEditorGUI.Popup("Facing", fallbackCullType, sFallbackCullTypes); + + switch(fallbackShaderType) + { + case 0: tag = "Unlit"; break; + case 1: tag = "Standard"; break; + case 2: tag = "VertexLit"; break; + case 3: tag = "Toon"; break; + case 4: tag = "Particle"; break; + case 5: tag = "Sprite"; break; + case 6: tag = "Matcap"; break; + case 7: tag = "MobileToon"; break; + case 8: tag = "Hidden"; break; + default: tag = "Unlit"; break; + } + switch(fallbackRenderType) + { + case 0: break; + case 1: tag += "Cutout"; break; + case 2: tag += "Transparent"; break; + case 3: tag += "Fade"; break; + default: break; + } + switch(fallbackCullType) + { + case 0: break; + case 1: tag += "DoubleSided"; break; + default: break; + } + EditorGUILayout.LabelField("Result:", '"' + tag + '"'); + EditorGUILayout.EndVertical(); + } + else + { + tag = ""; + } + EditorGUI.showMixedValue = false; + if(EditorGUI.EndChangeCheck()) + { + foreach(var obj in m_MaterialEditor.targets.Where(obj => obj is Material)) + { + ((Material)obj).SetOverrideTag("VRCFallback", tag); + EditorUtility.SetDirty(obj); + } + AssetDatabase.SaveAssets(); + } + EditorGUILayout.EndVertical(); + } + #endif + } + + private void DrawOptimizationButton(Material material, bool isnormal) + { + #if LILTOON_VRCSDK3_WORLDS + if(isnormal && lilEditorGUI.Button(GetLoc("sOptimizeForEvents"))) lilMaterialUtils.RemoveUnusedTexture(material); + #endif + } + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Editor + #region + private void CheckShaderType(Material material) + { + isLite = material.shader.name.Contains("Lite"); + isCutout = material.shader.name.Contains("Cutout"); + isTransparent = material.shader.name.Contains("Transparent") || material.shader.name.Contains("Overlay"); + isOutl = !isMultiVariants && material.shader.name.Contains("Outline"); + isRefr = !isMultiVariants && material.shader.name.Contains("Refraction"); + isBlur = !isMultiVariants && material.shader.name.Contains("Blur"); + isFur = !isMultiVariants && material.shader.name.Contains("Fur"); + isTess = !isMultiVariants && material.shader.name.Contains("Tessellation"); + isGem = !isMultiVariants && material.shader.name.Contains("Gem"); + isFakeShadow = !isMultiVariants && material.shader.name.Contains("FakeShadow"); + isOnePass = material.shader.name.Contains("OnePass"); + isTwoPass = material.shader.name.Contains("TwoPass"); + isMulti = material.shader.name.Contains("Multi"); + isCustomShader = material.shader.name.Contains("Optional"); + isShowRenderMode = !isCustomShader; + isStWr = stencilPass.floatValue == (float)StencilOp.Replace; + + renderingModeBuf = RenderingMode.Opaque; + if(isCutout) renderingModeBuf = RenderingMode.Cutout; + if(isTransparent) renderingModeBuf = RenderingMode.Transparent; + if(isRefr) renderingModeBuf = RenderingMode.Refraction; + if(isRefr && isBlur) renderingModeBuf = RenderingMode.RefractionBlur; + if(isFur) renderingModeBuf = RenderingMode.Fur; + if(isFur && isCutout) renderingModeBuf = RenderingMode.FurCutout; + if(isFur && isTwoPass) renderingModeBuf = RenderingMode.FurTwoPass; + if(isGem) renderingModeBuf = RenderingMode.Gem; + + transparentModeBuf = TransparentMode.Normal; + if(isOnePass) transparentModeBuf = TransparentMode.OnePass; + if(!isFur && isTwoPass) transparentModeBuf = TransparentMode.TwoPass; + + float tpmode = 0.0f; + if(material.HasProperty("_TransparentMode")) tpmode = material.GetFloat("_TransparentMode"); + + isUseAlpha = + renderingModeBuf == RenderingMode.Cutout || + renderingModeBuf == RenderingMode.Transparent || + renderingModeBuf == RenderingMode.Fur || + renderingModeBuf == RenderingMode.FurCutout || + renderingModeBuf == RenderingMode.FurTwoPass || + (isMulti && tpmode != 0.0f && tpmode != 3.0f && tpmode != 6.0f); + + if(isMulti) + { + isCutout = tpmode == 1.0f || tpmode == 5.0f; + isTransparent = tpmode == 2.0f; + } + } + + private void CopyProperties(PropertyBlock propertyBlock) + { + foreach(var p in AllProperties().Where(p => + p.p != null && + p.blocks.Contains(propertyBlock) + )) + { + copiedProperties[p.name] = p.p; + } + } + + private void PasteProperties(PropertyBlock propertyBlock, bool shouldCopyTex) + { + foreach(var p in AllProperties().Where(p => + p.p != null && + p.blocks.Contains(propertyBlock) && + !(!shouldCopyTex && p.isTexture) && + copiedProperties.ContainsKey(p.name) && + copiedProperties[p.name] != null + )) + { + var propType = p.type; + if(propType == MaterialProperty.PropType.Color) p.colorValue = copiedProperties[p.name].colorValue; + if(propType == MaterialProperty.PropType.Vector) p.vectorValue = copiedProperties[p.name].vectorValue; + if(propType == MaterialProperty.PropType.Float) p.floatValue = copiedProperties[p.name].floatValue; + if(propType == MaterialProperty.PropType.Range) p.floatValue = copiedProperties[p.name].floatValue; + if(propType == MaterialProperty.PropType.Texture) p.textureValue = copiedProperties[p.name].textureValue; + } + } + + private void ResetProperties(PropertyBlock propertyBlock) + { + #if UNITY_2019_3_OR_NEWER + foreach(var p in AllProperties().Where(p => + p.p != null && + p.blocks.Contains(propertyBlock) && + p.targets[0] is Material && + ((Material)p.targets[0]).shader != null + )) + { + var shader = ((Material)p.targets[0]).shader; + int propID = shader.FindPropertyIndex(p.name); + if(propID == -1) continue; + var propType = p.type; + if(propType == MaterialProperty.PropType.Color) p.colorValue = shader.GetPropertyDefaultVectorValue(propID); + if(propType == MaterialProperty.PropType.Vector) p.vectorValue = shader.GetPropertyDefaultVectorValue(propID); + if(propType == MaterialProperty.PropType.Float) p.floatValue = shader.GetPropertyDefaultFloatValue(propID); + if(propType == MaterialProperty.PropType.Range) p.floatValue = shader.GetPropertyDefaultFloatValue(propID); + if(propType == MaterialProperty.PropType.Texture) p.textureValue = null; + } + #endif + } + + private bool ShouldDrawBlock(PropertyBlock propertyBlock) + { + if(propertyBlock == PropertyBlock.Base && lilEditorGUI.CheckPropertyToDraw("Render Queue")) return true; + if(propertyBlock == PropertyBlock.Rendering && lilEditorGUI.CheckPropertyToDraw("Render Queue", "Enable GPU Instancing")) return true; + + foreach (var p in GetBlock2Properties()[propertyBlock]) + { + if (p.p == null ) { continue; } + if (lilEditorGUI.CheckPropertyToDraw(p) is false) { continue; } + return true; + } + return false; + } + + private bool ShouldDrawBlock(params string[] labels) + { + return lilEditorGUI.CheckPropertyToDraw(labels); + } + + private bool ShouldDrawBlock() + { + return lilEditorGUI.CheckPropertyToDraw(); + } + + private void CopyProperties(object obj) + { + CopyProperties((PropertyBlock)obj); + } + + private void PasteProperties(object obj) + { + var propertyBlockData = (PropertyBlockData)obj; + PasteProperties(propertyBlockData.propertyBlock, propertyBlockData.shouldCopyTex); + } + + private void ResetProperties(object obj) + { + ResetProperties((PropertyBlock)obj); + } + + private void ApplyLightingPreset(LightingPreset lightingPreset) + { + switch(lightingPreset) + { + case LightingPreset.Default: + if(asUnlit.p != null) asUnlit.floatValue = shaderSetting.defaultAsUnlit; + if(vertexLightStrength.p != null) vertexLightStrength.floatValue = shaderSetting.defaultVertexLightStrength; + if(lightMinLimit.p != null) lightMinLimit.floatValue = shaderSetting.defaultLightMinLimit; + if(lightMaxLimit.p != null) lightMaxLimit.floatValue = shaderSetting.defaultLightMaxLimit; + if(beforeExposureLimit.p != null) beforeExposureLimit.floatValue = shaderSetting.defaultBeforeExposureLimit; + if(monochromeLighting.p != null) monochromeLighting.floatValue = shaderSetting.defaultMonochromeLighting; + if(shadowEnvStrength.p != null) shadowEnvStrength.floatValue = 0.0f; + if(lilDirectionalLightStrength.p != null) lilDirectionalLightStrength.floatValue = shaderSetting.defaultlilDirectionalLightStrength; + break; + case LightingPreset.SemiMonochrome: + if(asUnlit.p != null) asUnlit.floatValue = 0.0f; + if(vertexLightStrength.p != null) vertexLightStrength.floatValue = 0.0f; + if(lightMinLimit.p != null) lightMinLimit.floatValue = 0.05f; + if(lightMaxLimit.p != null) lightMaxLimit.floatValue = 1.0f; + if(beforeExposureLimit.p != null) beforeExposureLimit.floatValue = 10000.0f; + if(monochromeLighting.p != null) monochromeLighting.floatValue = 0.5f; + if(shadowEnvStrength.p != null) shadowEnvStrength.floatValue = 0.0f; + if(lilDirectionalLightStrength.p != null) lilDirectionalLightStrength.floatValue = 1.0f; + break; + } + } + #endregion + + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs.meta new file mode 100644 index 00000000..07c29c67 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilGUIUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d2f25bf8c83594b4ca2d1c4a46ce4cd7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilInspector.cs b/Assets/External/lilToon/Editor/lilInspector/lilInspector.cs new file mode 100644 index 00000000..f0e5d019 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilInspector.cs @@ -0,0 +1,206 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + //------------------------------------------------------------------------------------------------------------------------------ + // ShaderGUI + public partial class lilToonInspector : ShaderGUI + { + //------------------------------------------------------------------------------------------------------------------------------ + // Custom properties + // If there are properties you have added, add them here. + protected static bool isCustomShader = false; + + protected virtual void LoadCustomProperties(MaterialProperty[] props, Material material) + { + } + + protected virtual void DrawCustomProperties(Material material) + { + #pragma warning disable 0618 + DrawCustomProperties(m_MaterialEditor, material, boxOuter, boxInnerHalf, boxInner, customBox, customToggleFont, GUI.skin.button); + #pragma warning restore 0618 + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Main GUI + #region + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) + { + isCustomEditor = false; + isMultiVariants = false; + materials = materialEditor.targets.Select(t => t as Material).Where(m => m != null).ToArray(); + DrawAllGUI(materialEditor, props, (Material)materialEditor.target); + } + + public void SetMaterials(Material[] materials2) + { + materials = materials2; + } + + public void DrawAllGUI(MaterialEditor materialEditor, MaterialProperty[] props, Material material) + { + if(lilDirectoryManager.ExistsEncryption() || lilDirectoryManager.ExistsAvaCryptV2()) + { + EditorGUILayout.HelpBox("Encryption will be removed in the future.", MessageType.Warning); + } + + // workaround for Unity bug (https://issuetracker.unity3d.com/issues/uv1-data-is-lost-during-assetbundle-build-when-optimize-mesh-data-is-on) + #if UNITY_2021_1_OR_NEWER + if(PlayerSettings.stripUnusedMeshComponents && lilEditorGUI.AutoFixHelpBox(GetLoc("sWarnOptimiseMeshData"))) + { + PlayerSettings.stripUnusedMeshComponents = false; + } + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // EditorAssets + lilEditorGUI.InitializeGUIStyles(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Initialize Setting + m_MaterialEditor = materialEditor; + lilShaderManager.InitializeShaders(); + lilToonSetting.InitializeShaderSetting(ref shaderSetting); + + //------------------------------------------------------------------------------------------------------------------------------ + // Load Properties + SetProperties(props); + + //------------------------------------------------------------------------------------------------------------------------------ + // Check Shader Type + CheckShaderType(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Load Custom Properties + LoadCustomProperties(props, material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Info + EditorGUI.BeginChangeCheck(); + DrawWebPages(); + DrawHelpPages(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Language + lilLanguageManager.SelectLang(); + sMainColorBranch = isUseAlpha ? GetLoc("sMainColorAlpha") : GetLoc("sMainColor"); + mainColorRGBAContent = isUseAlpha ? colorAlphaRGBAContent : colorRGBAContent; + + //------------------------------------------------------------------------------------------------------------------------------ + // Editor Mode + SelectEditorMode(); + DrawShaderTypeWarn(material); + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Main GUI + switch(edSet.editorMode) + { + case EditorMode.Simple: DrawSimpleGUI(material); break; + case EditorMode.Advanced: DrawAdvancedGUI(material); break; + case EditorMode.Preset: DrawPresetGUI(); break; + case EditorMode.Settings: DrawSettingsGUI(); break; + } + + if(EditorGUI.EndChangeCheck()) + { + material.SetFloat("_lilToonVersion", lilConstants.currentVersionValue); + if(!isMultiVariants) + { + if(isMulti) lilMaterialUtils.SetupMultiMaterial(material); + else lilMaterialUtils.RemoveShaderKeywords(material); + } + if(mainColor != null && baseColor != null && !mainColor.hasMixedValue) baseColor.colorValue = mainColor.colorValue; + if(mainTex != null && baseMap != null && !mainTex.hasMixedValue ) baseMap.textureValue = mainTex.textureValue; + if(mainTex != null && baseColorMap != null && !mainTex.hasMixedValue ) baseColorMap.textureValue = mainTex.textureValue; + + if(lilShaderAPI.IsTextureLimitedAPI()) + { + string shaderSettingString = lilToonSetting.BuildShaderSettingString(shaderSetting, true); + lilToonSetting.CheckTextures(ref shaderSetting, material); + string newShaderSettingString = lilToonSetting.BuildShaderSettingString(shaderSetting, true); + if(shaderSettingString != newShaderSettingString) + { + lilToonSetting.ApplyShaderSetting(shaderSetting); + } + } + } + } + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Language + #region + public static string GetLoc(string value) { return lilLanguageManager.GetLoc(value); } + public static string BuildParams(params string[] labels) { return lilLanguageManager.BuildParams(labels); } + public static void LoadCustomLanguage(string langFileGUID) { lilLanguageManager.LoadCustomLanguage(langFileGUID); } + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Custom Window + #region + public class lilMaterialEditor : EditorWindow + { + private Vector2 scrollPosition = Vector2.zero; + private MaterialEditor materialEditor; + private Material material; + private MaterialProperty[] props; + + [MenuItem("Window/_lil/[Beta] lilToon Multi-Editor")] + static void Init() + { + var window = (lilMaterialEditor)GetWindow(typeof(lilMaterialEditor), false, "[Beta] lilToon Multi-Editor"); + window.Show(); + } + + private void OnGUI() + { + var materials = Selection.GetFiltered(SelectionMode.DeepAssets).Where(m => m.shader != null).Where(m => m.shader.name.Contains("lilToon")).ToArray(); + if(materials.Length == 0) return; + + props = MaterialEditor.GetMaterialProperties(materials); + if(props == null) return; + + material = materials[0]; + isCustomEditor = true; + isMultiVariants = materials.Any(m => m.shader != material.shader); + materialEditor = (MaterialEditor)Editor.CreateEditor(materials, typeof(MaterialEditor)); + var inspector = new lilToonInspector(); + + EditorGUILayout.LabelField("Selected Materials", string.Join(", ", materials.Select(m => m.name).ToArray()), EditorStyles.boldLabel); + lilEditorGUI.DrawLine(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + EditorGUILayout.BeginVertical(InitializeMarginBox(20, 4, 4)); + inspector.SetMaterials(materials); + inspector.DrawAllGUI(materialEditor, props, material); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndScrollView(); + } + + private static GUIStyle InitializeMarginBox(int left, int right, int top) + { + return new GUIStyle + { + border = new RectOffset(0, 0, 0, 0), + margin = new RectOffset(left, right, top, 0), + padding = new RectOffset(0, 0, 0, 0), + overflow = new RectOffset(0, 0, 0, 0) + }; + } + } + #endregion + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilInspector.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilInspector.cs.meta new file mode 100644 index 00000000..796f4f6a --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aefa51cbc37d602418a38a02c3b9afb9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs b/Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs new file mode 100644 index 00000000..a2b04447 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs @@ -0,0 +1,250 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + + //------------------------------------------------------------------------------------------------------------------------------ + // Obsolete + #region + [Obsolete("Use \"DrawCustomProperties(Material material)\" instead.")] + protected virtual void DrawCustomProperties( + MaterialEditor materialEditor, + Material material, + GUIStyle boxOuter, + GUIStyle boxInnerHalf, + GUIStyle boxInner, + GUIStyle customBox, + GUIStyle customToggleFont, + GUIStyle offsetButton) + { + } + + [Obsolete("This may be deleted in the future.")] + public static bool EqualsShaderSetting(lilToonSetting ssA, lilToonSetting ssB) + { + if((ssA == null && ssB != null) || (ssA != null && ssB == null)) return false; + if(ssA == null && ssB == null) return true; + return !typeof(lilToonSetting).GetFields(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly).Any(f => f.FieldType == typeof(bool) && (bool)f.GetValue(ssA) != (bool)f.GetValue(ssB)); + } + + [Obsolete("This may be deleted in the future.")] + public static void CopyShaderSetting(ref lilToonSetting ssA, lilToonSetting ssB) + { + if(ssA == null || ssB == null) return; + + foreach(var field in typeof(lilToonSetting).GetFields(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly)) + { + field.SetValue(ssA, field.GetValue(ssB)); + } + } + + [Obsolete("Use \"lilToonSetting.InitializeShaderSetting(ref lilToonSetting shaderSetting)\" instead.")] + public static void InitializeShaderSetting(ref lilToonSetting shaderSetting) + { + lilToonSetting.InitializeShaderSetting(ref shaderSetting); + } + + [Obsolete("Use \"lilToonSetting.TurnOffAllShaderSetting(ref lilToonSetting shaderSetting)\" instead.")] + public static void TurnOffAllShaderSetting(ref lilToonSetting shaderSetting) + { + lilToonSetting.TurnOffAllShaderSetting(ref shaderSetting); + } + + [Obsolete("Use \"lilToonSetting.TurnOnAllShaderSetting(ref lilToonSetting shaderSetting)\" instead.")] + public static void TurnOnAllShaderSetting(ref lilToonSetting shaderSetting) + { + lilToonSetting.TurnOnAllShaderSetting(ref shaderSetting); + } + + [Obsolete("Use \"lilToonSetting.ApplyShaderSetting(lilToonSetting shaderSetting, string reportTitle = null)\" instead.")] + public static void ApplyShaderSetting(lilToonSetting shaderSetting, string reportTitle = null) + { + lilToonSetting.ApplyShaderSetting(shaderSetting, reportTitle); + } + + [Obsolete("Use \"lilToonSetting.BuildShaderSettingString(lilToonSetting shaderSetting, bool isFile)\" instead.")] + public static string BuildShaderSettingString(lilToonSetting shaderSetting, bool isFile) + { + return lilToonSetting.BuildShaderSettingString(shaderSetting, isFile); + } + + [Obsolete("Use \"lilToonSetting.BuildShaderSettingString(bool isFile)\" instead.")] + public static string BuildShaderSettingString(bool isFile) + { + return lilToonSetting.BuildShaderSettingString(isFile); + } + + [Obsolete("Use \"lilToonSetting.ApplyShaderSettingOptimized()\" instead.")] + public static void ApplyShaderSettingOptimized() + { + lilToonSetting.ApplyShaderSettingOptimized(); + } + + [Obsolete("Use \"lilToonSetting.SetShaderSettingAfterBuild()\" instead.")] + public static void SetShaderSettingAfterBuild() + { + lilToonSetting.SetShaderSettingAfterBuild(); + } + + [Obsolete("Use \"lilToonPreset.ApplyPreset(Material material, lilToonPreset preset, bool ismulti)\" instead.")] + public static void ApplyPreset(Material material, lilToonPreset preset, bool ismulti) + { + lilToonPreset.ApplyPreset(material, preset, ismulti); + } + + [Obsolete("Use \"lilTextureUtils.LoadTexture(ref Texture2D tex, string path)\" instead.")] + public static void LoadTexture(ref Texture2D tex, string path) + { + lilTextureUtils.LoadTexture(ref tex, path); + } + + [Obsolete("Use \"lilTextureUtils.SaveTextureToPng(string path, string add, Texture2D tex)\" instead.")] + public static string SavePng(string path, string add, Texture2D tex) + { + return lilTextureUtils.SaveTextureToPng(path, add, tex); + } + + [Obsolete("Use \"lilTextureUtils.ConvertGifToAtlas(Object tex)\" instead.")] + public static string ConvertGifToAtlas(Object tex) + { + return lilTextureUtils.ConvertGifToAtlas(tex); + } + + [Obsolete("Use \"lilTextureUtils.ConvertGifToAtlas(Object tex, out int frameCount, out int loopXY, out int duration, out float xScale, out float yScale)\" instead.")] + public static string ConvertGifToAtlas(Object tex, out int frameCount, out int loopXY, out int duration, out float xScale, out float yScale) + { + return lilTextureUtils.ConvertGifToAtlas(tex, out frameCount, out loopXY, out duration, out xScale, out yScale); + } + + [Obsolete("Use \"lilLanguageManager.InitializeLanguage()\" instead.")] + public static void InitializeLanguage() + { + lilLanguageManager.InitializeLanguage(); + } + + [Obsolete("Use \"lilEditorGUI.InitializeBox(int border, int margin, int padding)\" instead.")] + public static GUIStyle InitializeBox(int border, int margin, int padding) + { + return lilEditorGUI.InitializeBox(border, margin, padding); + } + + [Obsolete("Use \"lilEditorGUI.DrawWebButton(string text, string URL)\" instead.")] + public static void DrawWebButton(string text, string URL) + { + lilEditorGUI.DrawWebButton(text, URL); + } + + [Obsolete("Use \"condition = lilEditorGUI.DrawSimpleFoldout(string label, bool condition, GUIStyle style, bool isCustomEditor = true)\" instead.")] + public static void DrawSimpleFoldout(string label, ref bool condition, GUIStyle style, bool isCustomEditor = true) + { + condition = lilEditorGUI.DrawSimpleFoldout(label, condition, style, isCustomEditor); + } + + [Obsolete("Use \"condition = lilEditorGUI.DrawSimpleFoldout(string label, bool condition, bool isCustomEditor = true)\" instead.")] + public static void DrawSimpleFoldout(string label, ref bool condition, bool isCustomEditor = true) + { + condition = lilEditorGUI.DrawSimpleFoldout(label, condition, isCustomEditor); + } + + [Obsolete("Use \"condition = lilEditorGUI.DrawSimpleFoldout(MaterialEditor materialEditor, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, bool condition, bool isCustomEditor = true)\" instead.")] + public static void DrawSimpleFoldout(GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, ref bool condition, bool isCustomEditor = true) + { + condition = lilEditorGUI.DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, rgba, condition, isCustomEditor); + } + + [Obsolete("Use \"condition = lilEditorGUI.DrawSimpleFoldout(MaterialEditor materialEditor, GUIContent guiContent, MaterialProperty textureName, bool condition, bool isCustomEditor = true)\" instead.")] + public static void DrawSimpleFoldout(GUIContent guiContent, MaterialProperty textureName, ref bool condition, bool isCustomEditor = true) + { + condition = lilEditorGUI.DrawSimpleFoldout(m_MaterialEditor, guiContent, textureName, condition, isCustomEditor); + } + + [Obsolete("Use \"lilShaderManager.InitializeShaders()\" instead.")] + public static void InitializeShaders() + { + lilShaderManager.InitializeShaders(); + } + + [Obsolete("Use \"lilMaterialUtils.CheckMainTextureName(string name)\" instead.")] + public static bool CheckMainTextureName(string name) + { + return lilMaterialUtils.CheckMainTextureName(name); + } + + [Obsolete("Use \"lilMaterialUtils.RemoveUnusedTexture(Material material)\" instead.")] + public static void RemoveUnusedTexture(Material material) + { + lilMaterialUtils.RemoveUnusedTexture(material); + } + + [Obsolete("Use \"lilToonPreset.ApplyPreset(Material material, lilToonPreset preset, bool ismulti)\" instead.")] + public static void ApplyPreset(Material material, lilToonPreset preset) + { + lilToonPreset.ApplyPreset(material, preset, isMulti); + } + + [Obsolete("Use \"lilEditorGUI.ConvertGifToAtlas(MaterialProperty tex, MaterialProperty decalAnimation, MaterialProperty decalSubParam, MaterialProperty isDecal)\" instead.")] + public static void ConvertGifToAtlas(MaterialProperty tex, MaterialProperty decalAnimation, MaterialProperty decalSubParam, MaterialProperty isDecal) + { + lilEditorGUI.ConvertGifToAtlas(tex, decalAnimation, decalSubParam, isDecal); + } + + [Obsolete("This may be deleted in the future.")] + public static void SetupShaderSettingFromMaterial(Material material, ref lilToonSetting shaderSetting) + { + SetupShaderSettingFromMaterial(material, ref shaderSetting); + } + + [Obsolete("This may be deleted in the future.")] public static void ApplyEditorSettingTemp(){} + [Obsolete("This may be deleted in the future.")] public static void SaveEditorSettingTemp(){} + + private const string WARN_ABOUT_DIRECTORY = "Methods related to directories have been moved to lilDirectoryManager."; + [Obsolete(WARN_ABOUT_DIRECTORY)] public const string editorSettingTempPath = lilDirectoryManager.editorSettingTempPath; + [Obsolete(WARN_ABOUT_DIRECTORY)] public const string versionInfoTempPath = lilDirectoryManager.versionInfoTempPath; + [Obsolete(WARN_ABOUT_DIRECTORY)] public const string packageListTempPath = lilDirectoryManager.packageListTempPath; + [Obsolete(WARN_ABOUT_DIRECTORY)] public const string postBuildTempPath = lilDirectoryManager.postBuildTempPath; + [Obsolete(WARN_ABOUT_DIRECTORY)] public const string startupTempPath = lilDirectoryManager.startupTempPath; + #if NET_4_6 + [Obsolete(WARN_ABOUT_DIRECTORY)] public const string rspPath = "Assets/csc.rsp"; + #else + [Obsolete(WARN_ABOUT_DIRECTORY)] public const string rspPath = "Assets/mcs.rsp"; + #endif + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetMainFolderPath() { return lilDirectoryManager.GetMainFolderPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetEditorFolderPath() { return lilDirectoryManager.GetEditorFolderPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetPresetsFolderPath() { return lilDirectoryManager.GetPresetsFolderPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetEditorPath() { return lilDirectoryManager.GetEditorPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetShaderFolderPath() { return lilDirectoryManager.GetShaderFolderPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetShaderPipelinePath() { return lilDirectoryManager.GetShaderPipelinePath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetShaderCommonPath() { return lilDirectoryManager.GetShaderCommonPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetShaderSettingHLSLPath() { return "" ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetEditorLanguageFileGUID() { return lilDirectoryManager.GetEditorLanguageFileGUID(); } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetAvatarEncryptionPath() { return lilDirectoryManager.GetAvatarEncryptionPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUIBoxInDarkPath() { return lilDirectoryManager.GetGUIBoxInDarkPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUIBoxInLightPath() { return lilDirectoryManager.GetGUIBoxInLightPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUIBoxInHalfDarkPath() { return lilDirectoryManager.GetGUIBoxInHalfDarkPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUIBoxInHalfLightPath() { return lilDirectoryManager.GetGUIBoxInHalfLightPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUIBoxOutDarkPath() { return lilDirectoryManager.GetGUIBoxOutDarkPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUIBoxOutLightPath() { return lilDirectoryManager.GetGUIBoxOutLightPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUICustomBoxDarkPath() { return lilDirectoryManager.GetGUICustomBoxDarkPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetGUICustomBoxLightPath() { return lilDirectoryManager.GetGUICustomBoxLightPath() ; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string[] GetShaderFolderPaths() { return lilDirectoryManager.GetShaderFolderPaths(); } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetSettingFolderPath() { return lilDirectoryManager.GetMainFolderPath(); } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GetShaderSettingPath() { return lilDirectoryManager.GetMainFolderPath() + "/ShaderSetting.asset"; } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static string GUIDToPath(string GUID) { return lilDirectoryManager.GUIDToPath(GUID); } + [Obsolete(WARN_ABOUT_DIRECTORY)] public static bool ExistsEncryption() { return lilDirectoryManager.ExistsEncryption(); } + #endregion + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs.meta new file mode 100644 index 00000000..e7ca8833 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilInspectorObsoletes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 60e5dd2621e7ef04990250b3aef23b0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs b/Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs new file mode 100644 index 00000000..233e4684 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs @@ -0,0 +1,1910 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + + private void DrawSimpleGUI(Material material) + { + #if UNITY_2019_1_OR_NEWER + edSet.searchKeyWord = EditorGUILayout.TextField(edSet.searchKeyWord, EditorStyles.toolbarSearchField); + #else + edSet.searchKeyWord = EditorGUILayout.TextField(edSet.searchKeyWord); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Base Setting + DrawBaseSettings(material, sTransparentMode, sRenderingModeList, sRenderingModeListLite, sTransparentModeList); + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + if(!isFakeShadow) DrawLightingSettingsSimple(); + + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Custom Properties + if(isCustomShader && !isFakeShadow) + { + EditorGUILayout.Space(); + GUILayout.Label(GetLoc("sCustomProperties"), boldLabel); + DrawCustomProperties(material); + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Colors + GUILayout.Label(GetLoc("sColors"), boldLabel); + + if(ShouldDrawBlock(PropertyBlock.MainColor)) + { + edSet.isShowMain = lilEditorGUI.Foldout(GetLoc("sMainColorSettingSimple"), edSet.isShowMain); + if(edSet.isShowMain) + { + if(isLite || isGem || isFakeShadow) + { + // Main + //if(useMainTex.floatValue == 1) + //{ + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(sMainColorBranch, customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(mainColorRGBAContent, mainTex, mainColor); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + //} + } + else + { + // Main + //if(useMainTex.floatValue == 1) + //{ + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(sMainColorBranch, customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(mainColorRGBAContent, mainTex, mainColor); + lilEditorGUI.DrawLine(); + DrawMainAdjustSettings(material); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + //} + + // Main 2nd + if(useMain2ndTex.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sMainColor2nd"), customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTextureWithAlpha(colorRGBAContent, main2ndTex, mainColor2nd); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + + // Main 3rd + if(useMain3rdTex.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sMainColor3rd"), customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTextureWithAlpha(colorRGBAContent, main3rdTex, mainColor3rd); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + if(!isFakeShadow && !isLite) DrawAlphaMaskSettings(material); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Shadow + if((!isFakeShadow && !isGem) || isLite) + { + DrawShadowSettingsSimple(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Emission + if(isLite && ShouldDrawBlock(PropertyBlock.Emission)) + { + edSet.isShowEmission = lilEditorGUI.Foldout(GetLoc("sEmissionSetting"), edSet.isShowEmission); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission); + if(edSet.isShowEmission) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useEmission); + if(useEmission.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(colorMaskRGBAContent, emissionMap); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + else if(!isFakeShadow && ShouldDrawBlock(PropertyBlock.Emission)) + { + edSet.isShowEmission = lilEditorGUI.Foldout(GetLoc("sEmissionSetting"), edSet.isShowEmission); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission); + if(edSet.isShowEmission) + { + // Emission + if(ShouldDrawBlock(PropertyBlock.Emission1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useEmission, false); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission1st); + if(useEmission.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowEmissionMap, colorMaskRGBAContent, emissionMap, emissionColor, emissionMap_ScrollRotate, emissionMap_UVMode, true, true); + LocalizedPropertyAlpha(emissionColor); + LocalizedProperty(emissionMainStrength); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowEmissionBlendMask, maskBlendRGBAContent, emissionBlendMask, emissionBlend, emissionBlendMask_ScrollRotate, true, true); + LocalizedProperty(emissionBlendMode); + lilEditorGUI.DrawLine(); + LocalizedProperty(emissionFluorescence); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + // Emission 2nd + if(ShouldDrawBlock(PropertyBlock.Emission2nd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useEmission2nd, false); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission2nd); + if(useEmission2nd.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowEmission2ndMap, colorMaskRGBAContent, emission2ndMap, emission2ndColor, emission2ndMap_ScrollRotate, emission2ndMap_UVMode, true, true); + LocalizedPropertyAlpha(emission2ndColor); + LocalizedProperty(emission2ndMainStrength); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowEmission2ndBlendMask, maskBlendRGBAContent, emission2ndBlendMask, emission2ndBlend, emission2ndBlendMask_ScrollRotate, true, true); + LocalizedProperty(emission2ndBlendMode); + lilEditorGUI.DrawLine(); + LocalizedProperty(emission2ndFluorescence); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Normal & Reflection + if(!isFakeShadow) + { + GUILayout.Label(GetLoc("sNormalMapReflection"), boldLabel); + if(!isLite && ShouldDrawBlock(PropertyBlock.NormalMap)) + { + edSet.isShowBump = lilEditorGUI.Foldout(GetLoc("sNormalMapSetting"), edSet.isShowBump); + DrawMenuButton(GetLoc("sAnchorNormalMap"), PropertyBlock.NormalMap); + if(edSet.isShowBump) + { + //------------------------------------------------------------------------------------------------------------------------------ + // 1st + if(ShouldDrawBlock(PropertyBlock.NormalMap1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useBumpMap, false); + DrawMenuButton(GetLoc("sAnchorNormalMap"), PropertyBlock.NormalMap1st); + if(useBumpMap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowBumpMap, normalMapContent, bumpMap, bumpScale); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // 2nd + if(ShouldDrawBlock(PropertyBlock.NormalMap2nd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useBump2ndMap, false); + DrawMenuButton(GetLoc("sAnchorNormalMap"), PropertyBlock.NormalMap2nd); + if(useBump2ndMap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowBump2ndMap, normalMapContent, bump2ndMap, bump2ndScale, bump2ndMap_UVMode, "UV Mode|UV0|UV1|UV2|UV3"); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowBump2ndScaleMask, maskStrengthContent, bump2ndScaleMask); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } + DrawMatCapSettingsSimple(); + DrawRimSettingsSimple(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Outline + DrawOutlineSettingsSimple(material); + + if(mtoon != null && ShouldDrawBlock() && lilEditorGUI.Button(GetLoc("sConvertMToon"))) CreateMToonMaterial(material); + } + + private void DrawAdvancedGUI(Material material) + { + #if UNITY_2019_1_OR_NEWER + edSet.searchKeyWord = EditorGUILayout.TextField(edSet.searchKeyWord, EditorStyles.toolbarSearchField); + #else + edSet.searchKeyWord = EditorGUILayout.TextField(edSet.searchKeyWord); + #endif + if(isLite) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Base Setting + DrawBaseSettings(material, sTransparentMode, sRenderingModeList, sRenderingModeListLite, sTransparentModeList); + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + DrawLightingSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // UV + if(ShouldDrawBlock(PropertyBlock.UV)) + { + edSet.isShowMainUV = lilEditorGUI.Foldout(GetLoc("sMainUV"), edSet.isShowMainUV); + DrawMenuButton(GetLoc("sAnchorUVSetting"), PropertyBlock.UV); + if(edSet.isShowMainUV) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sMainUV"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorUVSetting"), PropertyBlock.UV); + EditorGUILayout.BeginVertical(boxInnerHalf); + UVSettingGUI(mainTex, mainTex_ScrollRotate); + LocalizedProperty(shiftBackfaceUV); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Custom Properties + if(isCustomShader) + { + EditorGUILayout.Space(); + GUILayout.Label(GetLoc("sCustomProperties"), boldLabel); + DrawCustomProperties(material); + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Colors + GUILayout.Label(GetLoc("sColors"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + if(ShouldDrawBlock(PropertyBlock.MainColor1st)) + { + edSet.isShowMain = lilEditorGUI.Foldout(GetLoc("sMainColorSetting"), edSet.isShowMain); + DrawMenuButton(GetLoc("sAnchorMainColor"), PropertyBlock.MainColor1st); + if(edSet.isShowMain) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Main + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(sMainColorBranch, customToggleFont); + DrawMenuButton(GetLoc("sAnchorMainColor1"), PropertyBlock.MainColor1st); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(mainColorRGBAContent, mainTex, mainColor); + if(isUseAlpha) lilEditorGUI.SetAlphaIsTransparencyGUI(mainTex); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Shadow + DrawShadowSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Emission + if(ShouldDrawBlock(PropertyBlock.Emission1st)) + { + edSet.isShowEmission = lilEditorGUI.Foldout(GetLoc("sEmissionSetting"), edSet.isShowEmission); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission1st); + if(edSet.isShowEmission) + { + // Emission + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useEmission, false); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission1st); + if(useEmission.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowEmissionMap, colorMaskRGBAContent, emissionMap, emissionColor, emissionMap_ScrollRotate, emissionMap_UVMode, true, true); + lilEditorGUI.DrawLine(); + LocalizedProperty(emissionBlink); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Normal & Reflection + GUILayout.Label(GetLoc("sNormalMapReflection"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap + DrawMatCapSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim + DrawRimSettings(); + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Advanced + GUILayout.Label(GetLoc("sAdvanced"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // Outline + DrawOutlineSettings(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Stencil + DrawStencilSettings(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Rendering + if(ShouldDrawBlock(PropertyBlock.Rendering)) + { + edSet.isShowRendering = lilEditorGUI.Foldout(GetLoc("sRenderingSetting"), edSet.isShowRendering); + DrawMenuButton(GetLoc("sAnchorRendering"), PropertyBlock.Rendering); + if(edSet.isShowRendering && ShouldDrawBlock(PropertyBlock.Rendering)) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Reset Button + if(lilEditorGUI.Button(GetLoc("sRenderingReset"))) + { + material.enableInstancing = false; + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Base + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sRenderingSetting"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + //------------------------------------------------------------------------------------------------------------------------------ + // Shader + int shaderType = 1; + int shaderTypeBuf = shaderType; + shaderType = lilEditorGUI.Popup(GetLoc("sShaderType"),shaderType,new string[]{GetLoc("sShaderTypeNormal"),GetLoc("sShaderTypeLite")}); + if(shaderTypeBuf != shaderType) + { + if(shaderType==0) isLite = false; + if(shaderType==1) isLite = true; + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Rendering + if(renderingModeBuf == RenderingMode.Transparent || renderingModeBuf == RenderingMode.Fur || renderingModeBuf == RenderingMode.FurTwoPass) + { + LocalizedProperty(subpassCutoff); + } + LocalizedProperty(cull); + LocalizedProperty(zclip); + LocalizedProperty(zwrite); + LocalizedProperty(ztest); + LocalizedProperty(offsetFactor); + LocalizedProperty(offsetUnits); + LocalizedProperty(colorMask); + LocalizedProperty(alphaToMask); + LocalizedProperty(lilShadowCasterBias); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlend, GetLoc("sForward"), srcBlend, dstBlend, srcBlendAlpha, dstBlendAlpha, blendOp, blendOpAlpha); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendAdd, GetLoc("sForwardAdd"), srcBlendFA, dstBlendFA, srcBlendAlphaFA, dstBlendAlphaFA, blendOpFA, blendOpAlphaFA); + lilEditorGUI.DrawLine(); + EnableInstancingField(); + RenderQueueField(); + LocalizedProperty(beforeExposureLimit); + LocalizedProperty(lilDirectionalLightStrength); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Pre + if(transparentModeBuf == TransparentMode.TwoPass) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField("PrePass", customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + LocalizedProperty(preCull); + LocalizedProperty(preZclip); + LocalizedProperty(preZwrite); + LocalizedProperty(preZtest); + LocalizedProperty(preOffsetFactor); + LocalizedProperty(preOffsetUnits); + LocalizedProperty(preColorMask); + LocalizedProperty(preAlphaToMask); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendPre, GetLoc("sForward"), preSrcBlend, preDstBlend, preSrcBlendAlpha, preDstBlendAlpha, preBlendOp, preBlendOpAlpha); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendAddPre, GetLoc("sForwardAdd"), preSrcBlendFA, preDstBlendFA, preSrcBlendAlphaFA, preDstBlendAlphaFA, preBlendOpFA, preBlendOpAlphaFA); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Outline + if(isOutl) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sOutline"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + LocalizedProperty(outlineCull); + LocalizedProperty(outlineZclip); + LocalizedProperty(outlineZwrite); + LocalizedProperty(outlineZtest); + LocalizedProperty(outlineOffsetFactor); + LocalizedProperty(outlineOffsetUnits); + LocalizedProperty(outlineColorMask); + LocalizedProperty(outlineAlphaToMask); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendOutline, GetLoc("sForward"), outlineSrcBlend, outlineDstBlend, outlineSrcBlendAlpha, outlineDstBlendAlpha, outlineBlendOp, outlineBlendOpAlpha); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendAddOutline, GetLoc("sForwardAdd"), outlineSrcBlendFA, outlineDstBlendFA, outlineSrcBlendAlphaFA, outlineDstBlendAlphaFA, outlineBlendOpFA, outlineBlendOpAlphaFA); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Light Bake + if(ShouldDrawBlock("Double Sided Global Illumination", "Global Illumination")) + { + edSet.isShowLightBake = lilEditorGUI.Foldout(GetLoc("sLightBakeSetting"), edSet.isShowLightBake); + //DrawMenuButton(GetLoc("sAnchorLightBake"), PropertyBlock.LightBake); + if(edSet.isShowLightBake) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sLightBakeSetting"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + if(!isCustomEditor) DoubleSidedGIField(); + if(!isCustomEditor) LightmapEmissionFlagsProperty(); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Optimization + if(!isMultiVariants && ShouldDrawBlock()) + { + GUILayout.Label(GetLoc("sOptimization"), boldLabel); + edSet.isShowOptimization = lilEditorGUI.Foldout(GetLoc("sOptimization"), edSet.isShowOptimization); + lilEditorGUI.DrawHelpButton(GetLoc("sAnchorOptimization")); + if(edSet.isShowOptimization) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sOptimization"), customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + DrawOptimizationButton(material, !(isLite && isMulti)); + lilEditorGUI.RemoveUnusedPropertiesGUI(material); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + } + else if(isFakeShadow) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Base Setting + if(ShouldDrawBlock(PropertyBlock.Base)) + { + GUILayout.Label(GetLoc("sBaseSetting"), boldLabel); + edSet.isShowBase = lilEditorGUI.Foldout(GetLoc("sBaseSetting"), edSet.isShowBase); + DrawMenuButton(GetLoc("sAnchorBaseSetting"), PropertyBlock.Base); + if(edSet.isShowBase) + { + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(cull); + LocalizedProperty(invisible); + LocalizedProperty(zwrite); + RenderQueueField(); + lilEditorGUI.DrawLine(); + GUILayout.Label("FakeShadow", boldLabel); + LocalizedProperty(fakeShadowVector); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // UV + if(ShouldDrawBlock(PropertyBlock.UV)) + { + edSet.isShowMainUV = lilEditorGUI.Foldout(GetLoc("sMainUV"), edSet.isShowMainUV); + DrawMenuButton(GetLoc("sAnchorUVSetting"), PropertyBlock.UV); + if(edSet.isShowMainUV) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sMainUV"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorUVSetting"), PropertyBlock.UV); + EditorGUILayout.BeginVertical(boxInnerHalf); + UVSettingGUI(mainTex); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Custom Properties + if(isCustomShader) + { + EditorGUILayout.Space(); + GUILayout.Label(GetLoc("sCustomProperties"), boldLabel); + DrawCustomProperties(material); + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Colors + GUILayout.Label(GetLoc("sColors"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + if(ShouldDrawBlock(PropertyBlock.MainColor1st)) + { + edSet.isShowMain = lilEditorGUI.Foldout(GetLoc("sMainColorSetting"), edSet.isShowMain); + DrawMenuButton(GetLoc("sAnchorMainColor"), PropertyBlock.MainColor1st); + if(edSet.isShowMain) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Main + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(sMainColorBranch, customToggleFont); + DrawMenuButton(GetLoc("sAnchorMainColor1"), PropertyBlock.MainColor1st); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(mainColorRGBAContent, mainTex, mainColor); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Advanced + GUILayout.Label(GetLoc("sAdvanced"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // Encryption + DrawEncryptionSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Stencil + if(ShouldDrawBlock(PropertyBlock.Stencil)) + { + edSet.isShowStencil = lilEditorGUI.Foldout(GetLoc("sStencilSetting"), edSet.isShowStencil); + DrawMenuButton(GetLoc("sAnchorStencil"), PropertyBlock.Stencil); + if(edSet.isShowStencil) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sStencilSetting"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorStencil"), PropertyBlock.Stencil); + EditorGUILayout.BeginVertical(boxInner); + //------------------------------------------------------------------------------------------------------------------------------ + // Auto Setting + if(lilEditorGUI.Button("Set Writer")) + { + isStWr = true; + stencilRef.floatValue = 51; + stencilReadMask.floatValue = 255.0f; + stencilWriteMask.floatValue = 255.0f; + stencilComp.floatValue = (float)CompareFunction.Equal; + stencilPass.floatValue = (float)StencilOp.Replace; + stencilFail.floatValue = (float)StencilOp.Keep; + stencilZFail.floatValue = (float)StencilOp.Keep; + material.renderQueue = material.shader.renderQueue - 1; + if(renderingModeBuf == RenderingMode.Opaque) material.renderQueue += 450; + } + if(lilEditorGUI.Button("Set Reader")) + { + isStWr = false; + stencilRef.floatValue = 51; + stencilReadMask.floatValue = 255.0f; + stencilWriteMask.floatValue = 255.0f; + stencilComp.floatValue = (float)CompareFunction.Equal; + stencilPass.floatValue = (float)StencilOp.Keep; + stencilFail.floatValue = (float)StencilOp.Keep; + stencilZFail.floatValue = (float)StencilOp.Keep; + material.renderQueue = -1; + if(renderingModeBuf == RenderingMode.Opaque) material.renderQueue += 450; + } + if(lilEditorGUI.Button("Reset")) + { + isStWr = false; + stencilRef.floatValue = 51; + stencilReadMask.floatValue = 255.0f; + stencilWriteMask.floatValue = 255.0f; + stencilComp.floatValue = (float)CompareFunction.Equal; + stencilPass.floatValue = (float)StencilOp.Keep; + stencilFail.floatValue = (float)StencilOp.Keep; + stencilZFail.floatValue = (float)StencilOp.Keep; + material.renderQueue = -1; + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Base + { + lilEditorGUI.DrawLine(); + LocalizedProperty(stencilRef); + LocalizedProperty(stencilReadMask); + LocalizedProperty(stencilWriteMask); + LocalizedProperty(stencilComp); + LocalizedProperty(stencilPass); + LocalizedProperty(stencilFail); + LocalizedProperty(stencilZFail); + } + + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Rendering + if(ShouldDrawBlock(PropertyBlock.Rendering)) + { + edSet.isShowRendering = lilEditorGUI.Foldout(GetLoc("sRenderingSetting"), edSet.isShowRendering); + DrawMenuButton(GetLoc("sAnchorRendering"), PropertyBlock.Rendering); + if(edSet.isShowRendering) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Reset Button + if(lilEditorGUI.Button(GetLoc("sRenderingReset"))) + { + material.enableInstancing = false; + material.renderQueue = -1; + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.DstColor); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_ZWrite", 1); + material.SetInt("_ZTest", 4); + material.SetFloat("_OffsetFactor", 0.0f); + material.SetFloat("_OffsetUnits", 0.0f); + material.SetInt("_ColorMask", 15); + material.SetInt("_AlphaToMask", 0); + material.SetInt("_SrcBlendAlpha", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_DstBlendAlpha", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_BlendOp", (int)BlendOp.Add); + material.SetInt("_BlendOpAlpha", (int)BlendOp.Add); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Base + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sRenderingSetting"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + LocalizedProperty(cull); + LocalizedProperty(zclip); + LocalizedProperty(zwrite); + LocalizedProperty(ztest); + LocalizedProperty(offsetFactor); + LocalizedProperty(offsetUnits); + LocalizedProperty(colorMask); + LocalizedProperty(alphaToMask); + LocalizedProperty(lilShadowCasterBias); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlend, GetLoc("sForward"), srcBlend, dstBlend, srcBlendAlpha, dstBlendAlpha, blendOp, blendOpAlpha); + lilEditorGUI.DrawLine(); + EnableInstancingField(); + RenderQueueField(); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Light Bake + if(ShouldDrawBlock("Double Sided Global Illumination", "Global Illumination")) + { + edSet.isShowLightBake = lilEditorGUI.Foldout(GetLoc("sLightBakeSetting"), edSet.isShowLightBake); + //DrawMenuButton(GetLoc("sAnchorLightBake"), PropertyBlock.LightBake); + if(edSet.isShowLightBake) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sLightBakeSetting"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + if(!isCustomEditor) DoubleSidedGIField(); + if(!isCustomEditor) LightmapEmissionFlagsProperty(); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Optimization + if(!isMultiVariants && ShouldDrawBlock()) + { + GUILayout.Label(GetLoc("sOptimization"), boldLabel); + edSet.isShowOptimization = lilEditorGUI.Foldout(GetLoc("sOptimization"), edSet.isShowOptimization); + lilEditorGUI.DrawHelpButton(GetLoc("sAnchorOptimization")); + if(edSet.isShowOptimization) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sOptimization"), customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + DrawOptimizationButton(material, !(isLite && isMulti)); + lilEditorGUI.RemoveUnusedPropertiesGUI(material); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + } + else + { + //------------------------------------------------------------------------------------------------------------------------------ + // Base Setting + DrawBaseSettings(material, sTransparentMode, sRenderingModeList, sRenderingModeListLite, sTransparentModeList); + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + DrawLightingSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // UV + if(ShouldDrawBlock(PropertyBlock.UV)) + { + edSet.isShowMainUV = lilEditorGUI.Foldout(GetLoc("sMainUV"), edSet.isShowMainUV); + DrawMenuButton(GetLoc("sAnchorUVSetting"), PropertyBlock.UV); + if(edSet.isShowMainUV) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sMainUV"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorUVSetting"), PropertyBlock.UV); + EditorGUILayout.BeginVertical(boxInnerHalf); + UVSettingGUI(mainTex, mainTex_ScrollRotate); + LocalizedProperty(shiftBackfaceUV); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Custom Properties + if(isCustomShader) + { + EditorGUILayout.Space(); + GUILayout.Label(GetLoc("sCustomProperties"), boldLabel); + DrawCustomProperties(material); + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Colors + GUILayout.Label(GetLoc("sColors"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + if(ShouldDrawBlock(PropertyBlock.MainColor)) + { + edSet.isShowMain = lilEditorGUI.Foldout(GetLoc("sMainColorSetting"), edSet.isShowMain); + DrawMenuButton(GetLoc("sAnchorMainColor"), PropertyBlock.MainColor); + if(edSet.isShowMain) + { + if(isGem) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Main + if(ShouldDrawBlock(PropertyBlock.MainColor1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(sMainColorBranch, customToggleFont); + DrawMenuButton(GetLoc("sAnchorMainColor1"), PropertyBlock.MainColor1st); + //LocalizedProperty(useMainTex); + //if(useMainTex.floatValue == 1) + //{ + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(mainColorRGBAContent, mainTex, mainColor); + EditorGUILayout.EndVertical(); + //} + EditorGUILayout.EndVertical(); + } + } + else + { + //------------------------------------------------------------------------------------------------------------------------------ + // Main + if(ShouldDrawBlock(PropertyBlock.MainColor1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(sMainColorBranch, customToggleFont); + DrawMenuButton(GetLoc("sAnchorMainColor1"), PropertyBlock.MainColor1st); + //LocalizedProperty(useMainTex); + //if(useMainTex.floatValue == 1) + //{ + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(mainColorRGBAContent, mainTex, mainColor); + if(isUseAlpha) lilEditorGUI.SetAlphaIsTransparencyGUI(mainTex); + lilEditorGUI.DrawLine(); + DrawMainAdjustSettings(material); + EditorGUILayout.EndVertical(); + //} + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // 2nd + if(ShouldDrawBlock(PropertyBlock.MainColor2nd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMain2ndTex, false); + DrawMenuButton(GetLoc("sAnchorMainColor2"), PropertyBlock.MainColor2nd); + if(useMain2ndTex.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(colorRGBAContent, main2ndTex, mainColor2nd); + EditorGUI.indentLevel += 2; + LocalizedPropertyAlpha(mainColor2nd); + LocalizedProperty(main2ndTexIsMSDF); + LocalizedProperty(main2ndTex_Cull); + EditorGUI.indentLevel -= 2; + LocalizedProperty(main2ndEnableLighting); + LocalizedProperty(main2ndTexBlendMode); + LocalizedProperty(main2ndTexAlphaMode); + lilEditorGUI.DrawLine(); + UV4Decal(main2ndTexIsDecal, main2ndTexIsLeftOnly, main2ndTexIsRightOnly, main2ndTexShouldCopy, main2ndTexShouldFlipMirror, main2ndTexShouldFlipCopy, main2ndTex, main2ndTex_ScrollRotate, main2ndTexAngle, main2ndTexDecalAnimation, main2ndTexDecalSubParam, main2ndTex_UVMode); + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(maskBlendContent, main2ndBlendMask); + EditorGUILayout.LabelField(GetLoc("sDistanceFade")); + EditorGUI.indentLevel++; + LocalizedProperty(main2ndDistanceFade); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + LocalizedProperty(main2ndDissolveParams); + if(main2ndDissolveParams.vectorValue.x == 1.0f) TextureGUI(ref edSet.isShowMain2ndDissolveMask, maskBlendContent, main2ndDissolveMask); + if(main2ndDissolveParams.vectorValue.x == 2.0f && main2ndDissolveParams.vectorValue.y == 0.0f) LocalizedProperty(main2ndDissolvePos, "sPosition|2"); + if(main2ndDissolveParams.vectorValue.x == 2.0f && main2ndDissolveParams.vectorValue.y == 1.0f) LocalizedProperty(main2ndDissolvePos, "sVector|2"); + if(main2ndDissolveParams.vectorValue.x == 3.0f && main2ndDissolveParams.vectorValue.y == 0.0f) LocalizedProperty(main2ndDissolvePos, "sPosition|3"); + if(main2ndDissolveParams.vectorValue.x == 3.0f && main2ndDissolveParams.vectorValue.y == 1.0f) LocalizedProperty(main2ndDissolvePos, "sVector|3"); + if(main2ndDissolveParams.vectorValue.x != 0.0f) + { + TextureGUI(ref edSet.isShowMain2ndDissolveNoiseMask, noiseMaskContent, main2ndDissolveNoiseMask, main2ndDissolveNoiseStrength, main2ndDissolveNoiseMask_ScrollRotate); + LocalizedProperty(main2ndDissolveColor); + } + lilEditorGUI.DrawLine(); + TextureBakeGUI(material, 5); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // 3rd + if(ShouldDrawBlock(PropertyBlock.MainColor3rd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMain3rdTex, false); + DrawMenuButton(GetLoc("sAnchorMainColor2"), PropertyBlock.MainColor3rd); + if(useMain3rdTex.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(colorRGBAContent, main3rdTex, mainColor3rd); + EditorGUI.indentLevel += 2; + LocalizedPropertyAlpha(mainColor3rd); + LocalizedProperty(main3rdTexIsMSDF); + LocalizedProperty(main3rdTex_Cull); + EditorGUI.indentLevel -= 2; + LocalizedProperty(main3rdEnableLighting); + LocalizedProperty(main3rdTexBlendMode); + LocalizedProperty(main3rdTexAlphaMode); + lilEditorGUI.DrawLine(); + UV4Decal(main3rdTexIsDecal, main3rdTexIsLeftOnly, main3rdTexIsRightOnly, main3rdTexShouldCopy, main3rdTexShouldFlipMirror, main3rdTexShouldFlipCopy, main3rdTex, main3rdTex_ScrollRotate, main3rdTexAngle, main3rdTexDecalAnimation, main3rdTexDecalSubParam, main3rdTex_UVMode); + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(maskBlendContent, main3rdBlendMask); + EditorGUILayout.LabelField(GetLoc("sDistanceFade")); + EditorGUI.indentLevel++; + LocalizedProperty(main3rdDistanceFade); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + LocalizedProperty(main3rdDissolveParams); + if(main3rdDissolveParams.vectorValue.x == 1.0f) TextureGUI(ref edSet.isShowMain3rdDissolveMask, maskBlendContent, main3rdDissolveMask); + if(main3rdDissolveParams.vectorValue.x == 2.0f && main3rdDissolveParams.vectorValue.y == 0.0f) LocalizedProperty(main3rdDissolvePos, "sPosition|2"); + if(main3rdDissolveParams.vectorValue.x == 2.0f && main3rdDissolveParams.vectorValue.y == 1.0f) LocalizedProperty(main3rdDissolvePos, "sVector|2"); + if(main3rdDissolveParams.vectorValue.x == 3.0f && main3rdDissolveParams.vectorValue.y == 0.0f) LocalizedProperty(main3rdDissolvePos, "sPosition|3"); + if(main3rdDissolveParams.vectorValue.x == 3.0f && main3rdDissolveParams.vectorValue.y == 1.0f) LocalizedProperty(main3rdDissolvePos, "sVector|3"); + if(main3rdDissolveParams.vectorValue.x != 0.0f) + { + TextureGUI(ref edSet.isShowMain3rdDissolveNoiseMask, noiseMaskContent, main3rdDissolveNoiseMask, main3rdDissolveNoiseStrength, main3rdDissolveNoiseMask_ScrollRotate); + LocalizedProperty(main3rdDissolveColor); + } + lilEditorGUI.DrawLine(); + TextureBakeGUI(material, 6); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha Mask + DrawAlphaMaskSettings(material); + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Shadow + if(!isGem) + { + DrawShadowSettings(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim Shade + if(!isGem) + { + if(ShouldDrawBlock(PropertyBlock.RimShade)) + { + edSet.isShowRimShade = lilEditorGUI.Foldout("RimShade", edSet.isShowRimShade); + DrawMenuButton(GetLoc("sAnchorRimShade"), PropertyBlock.RimShade); + if(edSet.isShowRimShade) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useRimShade, false); + DrawMenuButton(GetLoc("sAnchorRimShade"), PropertyBlock.RimShade); + if(useRimShade.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(colorMaskRGBAContent, rimShadeMask, rimShadeColor); + LocalizedProperty(rimShadeNormalStrength); + LocalizedProperty(rimShadeBorder); + LocalizedProperty(rimShadeBlur); + LocalizedProperty(rimShadeFresnelPower); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Emission + if(ShouldDrawBlock(PropertyBlock.Emission)) + { + edSet.isShowEmission = lilEditorGUI.Foldout(GetLoc("sEmissionSetting"), edSet.isShowEmission); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission); + if(edSet.isShowEmission) + { + // Emission + if(ShouldDrawBlock(PropertyBlock.Emission1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useEmission, false); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission1st); + if(useEmission.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowEmissionMap, colorMaskRGBAContent, emissionMap, emissionColor, emissionMap_ScrollRotate, emissionMap_UVMode, true, true); + LocalizedPropertyAlpha(emissionColor); + LocalizedProperty(emissionMainStrength); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowEmissionBlendMask, maskBlendRGBAContent, emissionBlendMask, emissionBlend, emissionBlendMask_ScrollRotate, true, true); + LocalizedProperty(emissionBlendMode); + lilEditorGUI.DrawLine(); + LocalizedProperty(emissionBlink); + lilEditorGUI.DrawLine(); + LocalizedProperty(emissionUseGrad); + if(emissionUseGrad.floatValue == 1) + { + EditorGUI.indentLevel++; + LocalizedPropertyTexture(gradSpeedContent, emissionGradTex, emissionGradSpeed); + if(lilEditorGUI.CheckPropertyToDraw(emissionGradSpeed)) lilTextureUtils.GradientEditor(material, "_eg", emiGrad, emissionGradSpeed); + EditorGUI.indentLevel--; + } + lilEditorGUI.DrawLine(); + LocalizedProperty(emissionParallaxDepth); + LocalizedProperty(emissionFluorescence); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + // Emission 2nd + if(ShouldDrawBlock(PropertyBlock.Emission2nd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useEmission2nd, false); + DrawMenuButton(GetLoc("sAnchorEmission"), PropertyBlock.Emission2nd); + if(useEmission2nd.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowEmission2ndMap, colorMaskRGBAContent, emission2ndMap, emission2ndColor, emission2ndMap_ScrollRotate, emission2ndMap_UVMode, true, true); + LocalizedPropertyAlpha(emission2ndColor); + LocalizedProperty(emission2ndMainStrength); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowEmission2ndBlendMask, maskBlendRGBAContent, emission2ndBlendMask, emission2ndBlend, emission2ndBlendMask_ScrollRotate, true, true); + LocalizedProperty(emission2ndBlendMode); + lilEditorGUI.DrawLine(); + LocalizedProperty(emission2ndBlink); + lilEditorGUI.DrawLine(); + LocalizedProperty(emission2ndUseGrad); + if(emission2ndUseGrad.floatValue == 1) + { + EditorGUI.indentLevel++; + LocalizedPropertyTexture(gradSpeedContent, emission2ndGradTex, emission2ndGradSpeed); + if(lilEditorGUI.CheckPropertyToDraw(emission2ndGradSpeed)) lilTextureUtils.GradientEditor(material, "_e2g", emi2Grad, emission2ndGradSpeed); + EditorGUI.indentLevel--; + } + lilEditorGUI.DrawLine(); + LocalizedProperty(emission2ndParallaxDepth); + LocalizedProperty(emission2ndFluorescence); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Normal / Reflection + GUILayout.Label(GetLoc("sNormalMapReflection"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // Normal + if(ShouldDrawBlock(PropertyBlock.NormalMap)) + { + edSet.isShowBump = lilEditorGUI.Foldout(GetLoc("sNormalMapSetting"), edSet.isShowBump); + DrawMenuButton(GetLoc("sAnchorNormalMap"), PropertyBlock.NormalMap); + if(edSet.isShowBump) + { + //------------------------------------------------------------------------------------------------------------------------------ + // 1st + if(ShouldDrawBlock(PropertyBlock.NormalMap1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useBumpMap, false); + DrawMenuButton(GetLoc("sAnchorNormalMap"), PropertyBlock.NormalMap1st); + if(useBumpMap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowBumpMap, normalMapContent, bumpMap, bumpScale); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // 2nd + if(ShouldDrawBlock(PropertyBlock.NormalMap2nd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useBump2ndMap, false); + DrawMenuButton(GetLoc("sAnchorNormalMap"), PropertyBlock.NormalMap2nd); + if(useBump2ndMap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowBump2ndMap, normalMapContent, bump2ndMap, bump2ndScale, bump2ndMap_UVMode, "UV Mode|UV0|UV1|UV2|UV3"); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowBump2ndScaleMask, maskStrengthContent, bump2ndScaleMask); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Anisotropy + if(ShouldDrawBlock(PropertyBlock.Anisotropy)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useAnisotropy, false); + DrawMenuButton(GetLoc("sAnchorAnisotropy"), PropertyBlock.Anisotropy); + if(useAnisotropy.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowAnisotropyTangentMap, normalMapContent, anisotropyTangentMap); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowAnisotropyScaleMask, maskStrengthContent, anisotropyScaleMask, anisotropyScale); + lilEditorGUI.DrawLine(); + GUILayout.Label(GetLoc("sApplyTo"), boldLabel); + EditorGUI.indentLevel++; + LocalizedProperty(anisotropy2Reflection); + if(anisotropy2Reflection.floatValue != 0.0f) + { + EditorGUI.indentLevel++; + EditorGUILayout.LabelField("1st Specular", boldLabel); + LocalizedProperty(anisotropyTangentWidth); + LocalizedProperty(anisotropyBitangentWidth); + LocalizedProperty(anisotropyShift); + LocalizedProperty(anisotropyShiftNoiseScale); + LocalizedProperty(anisotropySpecularStrength); + lilEditorGUI.DrawLine(); + EditorGUILayout.LabelField("2nd Specular", boldLabel); + LocalizedProperty(anisotropy2ndTangentWidth); + LocalizedProperty(anisotropy2ndBitangentWidth); + LocalizedProperty(anisotropy2ndShift); + LocalizedProperty(anisotropy2ndShiftNoiseScale); + LocalizedProperty(anisotropy2ndSpecularStrength); + lilEditorGUI.DrawLine(); + LocalizedProperty(anisotropyShiftNoiseMask); + EditorGUI.indentLevel--; + } + LocalizedProperty(anisotropy2MatCap); + LocalizedProperty(anisotropy2MatCap2nd); + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Backlight + if(!isGem && ShouldDrawBlock(PropertyBlock.Backlight)) + { + edSet.isShowBacklight = lilEditorGUI.Foldout(GetLoc("sBacklightSetting"), edSet.isShowBacklight); + DrawMenuButton(GetLoc("sAnchorBacklight"), PropertyBlock.Backlight); + if(edSet.isShowBacklight) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useBacklight, false); + DrawMenuButton(GetLoc("sAnchorBacklight"), PropertyBlock.Backlight); + if(useBacklight.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowBacklightColorTex, colorMaskRGBAContent, backlightColorTex, backlightColor); + EditorGUI.indentLevel++; + LocalizedPropertyAlpha(backlightColor); + LocalizedProperty(backlightMainStrength); + LocalizedProperty(backlightReceiveShadow); + LocalizedProperty(backlightBackfaceMask); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + LocalizedProperty(backlightNormalStrength); + lilEditorGUI.InvBorderGUI(backlightBorder); + LocalizedProperty(backlightBlur); + LocalizedProperty(backlightDirectivity); + LocalizedProperty(backlightViewStrength); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Reflection + if(!isGem && ShouldDrawBlock(PropertyBlock.Reflection)) + { + edSet.isShowReflections = lilEditorGUI.Foldout(GetLoc("sReflectionsSetting"), edSet.isShowReflections); + DrawMenuButton(GetLoc("sAnchorReflection"), PropertyBlock.Reflection); + if(edSet.isShowReflections) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Reflection + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useReflection, false); + DrawMenuButton(GetLoc("sAnchorReflection"), PropertyBlock.Reflection); + if(useReflection.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowSmoothnessTex, smoothnessContent, smoothnessTex, smoothness); + LocalizedProperty(gsaaStrength, 1); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowMetallicGlossMap, metallicContent, metallicGlossMap, metallic); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowReflectionColorTex, colorMaskRGBAContent, reflectionColorTex, reflectionColor); + EditorGUI.indentLevel++; + LocalizedPropertyAlpha(reflectionColor); + LocalizedProperty(reflectance); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + DrawSpecularMode(); + LocalizedProperty(applyReflection); + if(applyReflection.floatValue == 1.0f) + { + EditorGUI.indentLevel++; + LocalizedProperty(reflectionNormalStrength); + LocalizedPropertyTexture(cubemapContent, reflectionCubeTex, reflectionCubeColor); + LocalizedProperty(reflectionCubeOverride); + LocalizedProperty(reflectionCubeEnableLighting); + EditorGUI.indentLevel--; + } + if(isTransparent) LocalizedProperty(reflectionApplyTransparency); + LocalizedProperty(reflectionBlendMode); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap + DrawMatCapSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim + DrawRimSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Glitter + DrawGlitterSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Gem + if(isGem && ShouldDrawBlock(PropertyBlock.Gem)) + { + edSet.isShowGem = lilEditorGUI.Foldout(GetLoc("sGemSetting"), edSet.isShowGem); + DrawMenuButton(GetLoc("sAnchorGem"), PropertyBlock.Gem); + if(edSet.isShowGem) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sGem"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorGem"), PropertyBlock.Gem); + EditorGUILayout.BeginVertical(boxInnerHalf); + GUILayout.Label(GetLoc("sRefraction"), boldLabel); + EditorGUI.indentLevel++; + LocalizedProperty(refractionStrength); + LocalizedProperty(refractionFresnelPower); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + GUILayout.Label(GetLoc("sGem"), boldLabel); + EditorGUI.indentLevel++; + LocalizedProperty(gemChromaticAberration); + LocalizedProperty(gemEnvContrast); + LocalizedProperty(gemEnvColor); + lilEditorGUI.DrawLine(); + LocalizedProperty(gemParticleLoop); + LocalizedProperty(gemParticleColor); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + LocalizedProperty(gemVRParallaxStrength); + LocalizedPropertyTexture(smoothnessContent, smoothnessTex, smoothness); + LocalizedProperty(reflectance); + LocalizedPropertyTexture(cubemapContent, reflectionCubeTex, reflectionCubeColor); + LocalizedProperty(reflectionCubeOverride); + LocalizedProperty(reflectionCubeEnableLighting); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Advanced + GUILayout.Label(GetLoc("sAdvanced"), boldLabel); + + //------------------------------------------------------------------------------------------------------------------------------ + // Outline + DrawOutlineSettings(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Parallax + if(ShouldDrawBlock(PropertyBlock.Parallax)) + { + edSet.isShowParallax = lilEditorGUI.Foldout(GetLoc("sParallax"), edSet.isShowParallax); + DrawMenuButton(GetLoc("sAnchorParallax"), PropertyBlock.Parallax); + if(edSet.isShowParallax) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useParallax, false); + DrawMenuButton(GetLoc("sAnchorParallax"), PropertyBlock.Parallax); + if(useParallax.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(parallaxContent, parallaxMap, parallax); + LocalizedProperty(parallaxOffset); + LocalizedProperty(usePOM); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Distance Fade + if(ShouldDrawBlock(PropertyBlock.DistanceFade)) + { + edSet.isShowDistanceFade = lilEditorGUI.Foldout(GetLoc("sDistanceFade"), edSet.isShowDistanceFade); + DrawMenuButton(GetLoc("sAnchorDistanceFade"), PropertyBlock.DistanceFade); + if(edSet.isShowDistanceFade) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sDistanceFade"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorDistanceFade"), PropertyBlock.DistanceFade); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(distanceFadeColor); + EditorGUI.indentLevel++; + LocalizedProperty(distanceFade); + LocalizedProperty(distanceFadeMode); + EditorGUI.indentLevel--; + DrawLine(); + EditorGUILayout.LabelField(GetLoc("sRimLight")); + EditorGUI.indentLevel++; + LocalizedProperty(distanceFadeRimColor); + LocalizedPropertyAlpha(distanceFadeRimColor); + LocalizedProperty(distanceFadeRimFresnelPower); + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // AudioLink + if(ShouldDrawBlock(PropertyBlock.AudioLink)) + { + edSet.isShowAudioLink = lilEditorGUI.Foldout(GetLoc("sAudioLink"), edSet.isShowAudioLink); + DrawMenuButton(GetLoc("sAnchorAudioLink"), PropertyBlock.AudioLink); + if(edSet.isShowAudioLink) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useAudioLink, false); + DrawMenuButton(GetLoc("sAnchorAudioLink"), PropertyBlock.AudioLink); + if(useAudioLink.floatValue == 1) + { + string sALParamsNone = BuildParams(GetLoc("sOffset"), GetLoc("sAudioLinkBand"), GetLoc("sAudioLinkBandBass"), GetLoc("sAudioLinkBandLowMid"), GetLoc("sAudioLinkBandHighMid"), GetLoc("sAudioLinkBandTreble")); + string sALParamsPos = BuildParams(GetLoc("sScale"), GetLoc("sOffset"), GetLoc("sAudioLinkBand"), GetLoc("sAudioLinkBandBass"), GetLoc("sAudioLinkBandLowMid"), GetLoc("sAudioLinkBandHighMid"), GetLoc("sAudioLinkBandTreble")); + string sALParamsUV = BuildParams(GetLoc("sScale"), GetLoc("sOffset"), GetLoc("sAngle"), GetLoc("sAudioLinkBand"), GetLoc("sAudioLinkBandBass"), GetLoc("sAudioLinkBandLowMid"), GetLoc("sAudioLinkBandHighMid"), GetLoc("sAudioLinkBandTreble")); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(audioLinkUVMode); + if(audioLinkUVMode.floatValue == 0) LocalizedProperty(audioLinkUVParams, sALParamsNone); + if(audioLinkUVMode.floatValue == 1) LocalizedProperty(audioLinkUVParams, sALParamsPos); + if(audioLinkUVMode.floatValue == 2) LocalizedProperty(audioLinkUVParams, sALParamsUV); + if(audioLinkUVMode.floatValue == 3) TextureGUI(ref edSet.isShowAudioLinkMask, audioLinkMaskContent, audioLinkMask, null, audioLinkMask_ScrollRotate, audioLinkMask_UVMode, true, true); + if(audioLinkUVMode.floatValue == 4) + { + TextureGUI(ref edSet.isShowAudioLinkMask, audioLinkMaskSpectrumContent, audioLinkMask, null, audioLinkMask_ScrollRotate, audioLinkMask_UVMode, true, true); + lilEditorGUI.DrawVectorAs4Float(audioLinkUVParams, "Volume", "Base Boost", "Treble Boost", "Line Width"); + } + if(audioLinkUVMode.floatValue == 5) + { + LocalizedProperty(audioLinkUVParams, sALParamsPos); + LocalizedProperty(audioLinkStart); + } + lilEditorGUI.DrawLine(); + GUILayout.Label(GetLoc("sAudioLinkDefaultValue"), boldLabel); + EditorGUI.indentLevel++; + if(audioLinkUVMode.floatValue == 4) lilEditorGUI.DrawVectorAs4Float(audioLinkDefaultValue, GetLoc("sStrength"), "Detail", "Speed", GetLoc("sThreshold")); + else LocalizedProperty(audioLinkDefaultValue, BuildParams(GetLoc("sStrength"), GetLoc("sBlinkStrength"), GetLoc("sBlinkSpeed"), GetLoc("sThreshold"))); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + GUILayout.Label(GetLoc("sApplyTo"), boldLabel); + EditorGUI.indentLevel++; + LocalizedProperty(audioLink2Main2nd); + LocalizedProperty(audioLink2Main3rd); + LocalizedProperty(audioLink2Emission); + LocalizedProperty(audioLink2EmissionGrad); + LocalizedProperty(audioLink2Emission2nd); + LocalizedProperty(audioLink2Emission2ndGrad); + LocalizedProperty(audioLink2Vertex); + if(audioLink2Vertex.floatValue == 1) + { + EditorGUI.indentLevel++; + LocalizedProperty(audioLinkVertexUVMode); + if(audioLinkVertexUVMode.floatValue == 0) LocalizedProperty(audioLinkVertexUVParams, sALParamsNone); + if(audioLinkVertexUVMode.floatValue == 1) LocalizedProperty(audioLinkVertexUVParams, sALParamsPos); + if(audioLinkVertexUVMode.floatValue == 2) LocalizedProperty(audioLinkVertexUVParams, sALParamsUV); + if(audioLinkVertexUVMode.floatValue == 3) TextureGUI(ref edSet.isShowAudioLinkMask, audioLinkMaskContent, audioLinkMask, null, audioLinkMask_ScrollRotate, audioLinkMask_UVMode, true, true); + if(audioLinkVertexUVMode.floatValue == 1) LocalizedProperty(audioLinkVertexStart); + lilEditorGUI.DrawLine(); + LocalizedProperty(audioLinkVertexStrength); + EditorGUI.indentLevel--; + } + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + LocalizedProperty(audioLinkAsLocal); + if(audioLinkAsLocal.floatValue == 1) + { + LocalizedPropertyTexture(audioLinkLocalMapContent, audioLinkLocalMap); + LocalizedProperty(audioLinkLocalMapParams); + } + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Dissolve + if(ShouldDrawBlock(PropertyBlock.Dissolve)) + { + edSet.isShowDissolve = lilEditorGUI.Foldout(GetLoc("sDissolve"), edSet.isShowDissolve); + DrawMenuButton(GetLoc("sAnchorDissolve"), PropertyBlock.Dissolve); + if(edSet.isShowDissolve && ((renderingModeBuf == RenderingMode.Opaque && !isMulti) || (isMulti && transparentModeMat.floatValue == 0.0f))) + { + GUILayout.Label(GetLoc("sDissolveWarnOpaque"), wrapLabel); + } + if(edSet.isShowDissolve && (renderingModeBuf != RenderingMode.Opaque || (isMulti && transparentModeMat.floatValue != 0.0f))) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(dissolveParams, false); + DrawMenuButton(GetLoc("sAnchorDissolve"), PropertyBlock.Dissolve); + if(dissolveParams.vectorValue.x != 0) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(dissolveParams, sDissolveParamsOther); + float dissolveX = (float) Math.Round(dissolveParams.vectorValue.x); + float dissolveY = (float) Math.Round(dissolveParams.vectorValue.y); + + if(dissolveX == 1.0f) TextureGUI(ref edSet.isShowDissolveMask, maskBlendContent, dissolveMask); + if(dissolveX == 2.0f && dissolveY == 0.0f) LocalizedProperty(dissolvePos, "sPosition|2"); + if(dissolveX == 2.0f && dissolveY == 1.0f) LocalizedProperty(dissolvePos, "sVector|2"); + if(dissolveX == 3.0f && dissolveY == 0.0f) LocalizedProperty(dissolvePos, "sPosition|3"); + if(dissolveX == 3.0f && dissolveY == 1.0f) LocalizedProperty(dissolvePos, "sVector|3"); + TextureGUI(ref edSet.isShowDissolveNoiseMask, noiseMaskContent, dissolveNoiseMask, dissolveNoiseStrength, dissolveNoiseMask_ScrollRotate); + LocalizedProperty(dissolveColor); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // IDMask + if(ShouldDrawBlock(PropertyBlock.IDMask)) + { + edSet.isShowIDMask = lilEditorGUI.Foldout(GetLoc("sIDMask"), edSet.isShowIDMask); + DrawMenuButton(GetLoc("sAnchorIDMask"), PropertyBlock.IDMask); + if(edSet.isShowIDMask) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("ID Mask"), customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + EditorGUILayout.HelpBox("It is recommended that these properties be set from scripts.", MessageType.Warning); + EditorGUILayout.HelpBox("If you want to mask vertex ids 1000 to 1999, set:\r\n_IDMask1 = 1\r\n_IDMaskIndex1 = 1000\r\n_IDMaskIndex2 = 2000", MessageType.Info); + LocalizedProperty(idMaskCompile); + LocalizedProperty(idMaskFrom); + LocalizedProperty(idMaskIsBitmap); + + LocalizedProperty(idMask1); + LocalizedProperty(idMask2); + LocalizedProperty(idMask3); + LocalizedProperty(idMask4); + LocalizedProperty(idMask5); + LocalizedProperty(idMask6); + LocalizedProperty(idMask7); + LocalizedProperty(idMask8); + LocalizedProperty(idMaskIndex1); + LocalizedProperty(idMaskIndex2); + LocalizedProperty(idMaskIndex3); + LocalizedProperty(idMaskIndex4); + LocalizedProperty(idMaskIndex5); + LocalizedProperty(idMaskIndex6); + LocalizedProperty(idMaskIndex7); + LocalizedProperty(idMaskIndex8); + LocalizedProperty(idMaskControlsDissolve); + + if(idMaskControlsDissolve.p != null && idMaskControlsDissolve.floatValue > 0.5f) + { + LocalizedProperty(idMaskPrior1); + LocalizedProperty(idMaskPrior2); + LocalizedProperty(idMaskPrior3); + LocalizedProperty(idMaskPrior4); + LocalizedProperty(idMaskPrior5); + LocalizedProperty(idMaskPrior6); + LocalizedProperty(idMaskPrior7); + LocalizedProperty(idMaskPrior8); + } + + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // UDIM Discard + if (ShouldDrawBlock(PropertyBlock.UDIMDiscard)) + { + edSet.isShowUDIMDiscard = lilEditorGUI.Foldout(GetLoc("sUDIMDiscard"), edSet.isShowUDIMDiscard); + DrawMenuButton(GetLoc("sAnchorUDIMDiscard"), PropertyBlock.UDIMDiscard); + if(edSet.isShowUDIMDiscard) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(udimDiscardCompile); + DrawMenuButton(GetLoc("sUDIMDiscard"), PropertyBlock.UDIMDiscard); + if (udimDiscardCompile.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + EditorGUILayout.HelpBox("Your model needs to be set up for this feature! Place groups of vertexes on different whole number UV tiles.", MessageType.Info); + LocalizedProperty(udimDiscardUV); + LocalizedProperty(udimDiscardMethod); + + void UVDIMToggle(Rect position, MaterialProperty prop) + { + bool value = prop.floatValue != 0.0f; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + value = EditorGUI.Toggle(position, GUIContent.none, value); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = value ? 1.0f : 0.0f; + } + } + + var r0 = EditorGUILayout.GetControlRect(false); r0.width = 16; + var r1 = EditorGUILayout.GetControlRect(false); r1.width = 16; + var r2 = EditorGUILayout.GetControlRect(false); r2.width = 16; + var r3 = EditorGUILayout.GetControlRect(false); r3.width = 16; + + UVDIMToggle(r0, udimDiscardRow3_0); r0.x += 40; + UVDIMToggle(r1, udimDiscardRow2_0); r1.x += 40; + UVDIMToggle(r2, udimDiscardRow1_0); r2.x += 40; + UVDIMToggle(r3, udimDiscardRow0_0); r3.x += 40; + + UVDIMToggle(r0, udimDiscardRow3_1); r0.x += 40; + UVDIMToggle(r1, udimDiscardRow2_1); r1.x += 40; + UVDIMToggle(r2, udimDiscardRow1_1); r2.x += 40; + UVDIMToggle(r3, udimDiscardRow0_1); r3.x += 40; + + UVDIMToggle(r0, udimDiscardRow3_2); r0.x += 40; + UVDIMToggle(r1, udimDiscardRow2_2); r1.x += 40; + UVDIMToggle(r2, udimDiscardRow1_2); r2.x += 40; + UVDIMToggle(r3, udimDiscardRow0_2); r3.x += 40; + + UVDIMToggle(r0, udimDiscardRow3_3); + UVDIMToggle(r1, udimDiscardRow2_3); + UVDIMToggle(r2, udimDiscardRow1_3); + UVDIMToggle(r3, udimDiscardRow0_3); + + EditorGUILayout.EndVertical(); + } + + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Encryption + DrawEncryptionSettings(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Refraction + if(isRefr && ShouldDrawBlock(PropertyBlock.Refraction)) + { + edSet.isShowRefraction = lilEditorGUI.Foldout(GetLoc("sRefractionSetting"), edSet.isShowRefraction); + DrawMenuButton(GetLoc("sAnchorRefraction"), PropertyBlock.Refraction); + if(edSet.isShowRefraction) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sRefraction"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorRefraction"), PropertyBlock.Refraction); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(refractionStrength); + LocalizedProperty(refractionFresnelPower); + LocalizedProperty(refractionColorFromMain); + LocalizedProperty(refractionColor); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Fur + if(isFur && ShouldDrawBlock(PropertyBlock.Fur)) + { + edSet.isShowFur = lilEditorGUI.Foldout(GetLoc("sFurSetting"), edSet.isShowFur); + DrawMenuButton(GetLoc("sAnchorFur"), PropertyBlock.Fur); + if(edSet.isShowFur) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sFur"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorFur"), PropertyBlock.Fur); + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(normalMapContent, furVectorTex, furVectorScale); + LocalizedPropertyTexture(lengthMaskContent, furLengthMask); + LocalizedProperty(furVector); + if(isTwoPass) LocalizedProperty(furCutoutLength); + LocalizedProperty(vertexColor2FurVector); + LocalizedProperty(furGravity); + LocalizedProperty(furRandomize); + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(noiseMaskContent, furNoiseMask); + UVSettingGUI(furNoiseMask); + LocalizedPropertyTexture(alphaMaskContent, furMask); + LocalizedProperty(furAO); + lilEditorGUI.DrawLine(); + LocalizedProperty(furMeshType); + if(furMeshType.floatValue == 0) + { + int furLayerNum2 = (int)furLayerNum.floatValue; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = furLayerNum.hasMixedValue; + furLayerNum2 = lilEditorGUI.IntSlider(GetLoc(Event.current.alt ? furLayerNum.name : "sLayerNum"), furLayerNum2, 1, 3); + EditorGUI.showMixedValue = false; + if(EditorGUI.EndChangeCheck()) + { + furLayerNum.floatValue = furLayerNum2; + } + } + else + { + LocalizedProperty(furLayerNum); + } + lilEditorGUI.MinusRangeGUI(furRootOffset, GetLoc("sRootWidth")); + LocalizedProperty(furTouchStrength); + lilEditorGUI.DrawLine(); + EditorGUILayout.LabelField(GetLoc("sRimLight"), EditorStyles.boldLabel); + EditorGUI.indentLevel++; + LocalizedProperty(furRimColor); + LocalizedProperty(furRimFresnelPower); + LocalizedProperty(furRimAntiLight); + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Stencil + DrawStencilSettings(material); + + //------------------------------------------------------------------------------------------------------------------------------ + // Rendering + if(ShouldDrawBlock(PropertyBlock.Rendering)) + { + edSet.isShowRendering = lilEditorGUI.Foldout(GetLoc("sRenderingSetting"), edSet.isShowRendering); + DrawMenuButton(GetLoc("sAnchorRendering"), PropertyBlock.Rendering); + if(edSet.isShowRendering) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Reset Button + if(lilEditorGUI.Button(GetLoc("sRenderingReset"))) + { + material.enableInstancing = false; + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Base + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sRenderingSetting"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + //------------------------------------------------------------------------------------------------------------------------------ + // Shader + int shaderType = 0; + int shaderTypeBuf = shaderType; + shaderType = lilEditorGUI.Popup(GetLoc("sShaderType"),shaderType,new string[]{GetLoc("sShaderTypeNormal"),GetLoc("sShaderTypeLite")}); + if(shaderTypeBuf != shaderType) + { + if(shaderType==0) isLite = false; + if(shaderType==1) isLite = true; + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Rendering + if(renderingModeBuf == RenderingMode.Transparent || renderingModeBuf == RenderingMode.Fur || renderingModeBuf == RenderingMode.FurTwoPass || (isMulti && (transparentModeMat.floatValue == 2.0f || transparentModeMat.floatValue == 4.0f))) + { + LocalizedProperty(subpassCutoff); + } + LocalizedProperty(cull); + LocalizedProperty(zclip); + LocalizedProperty(zwrite); + LocalizedProperty(ztest); + LocalizedProperty(offsetFactor); + LocalizedProperty(offsetUnits); + LocalizedProperty(colorMask); + LocalizedProperty(alphaToMask); + LocalizedProperty(lilShadowCasterBias); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlend, GetLoc("sForward"), srcBlend, dstBlend, srcBlendAlpha, dstBlendAlpha, blendOp, blendOpAlpha); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendAdd, GetLoc("sForwardAdd"), srcBlendFA, dstBlendFA, srcBlendAlphaFA, dstBlendAlphaFA, blendOpFA, blendOpAlphaFA); + lilEditorGUI.DrawLine(); + if(!isCustomEditor) EnableInstancingField(); + RenderQueueField(); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Pre + if(transparentModeBuf == TransparentMode.TwoPass) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField("PrePass", customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + LocalizedProperty(preCull); + LocalizedProperty(preZclip); + LocalizedProperty(preZwrite); + LocalizedProperty(preZtest); + LocalizedProperty(preOffsetFactor); + LocalizedProperty(preOffsetUnits); + LocalizedProperty(preColorMask); + LocalizedProperty(preAlphaToMask); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendPre, GetLoc("sForward"), preSrcBlend, preDstBlend, preSrcBlendAlpha, preDstBlendAlpha, preBlendOp, preBlendOpAlpha); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Outline + if(isOutl) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sOutline"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + LocalizedProperty(outlineCull); + LocalizedProperty(outlineZclip); + LocalizedProperty(outlineZwrite); + LocalizedProperty(outlineZtest); + LocalizedProperty(outlineOffsetFactor); + LocalizedProperty(outlineOffsetUnits); + LocalizedProperty(outlineColorMask); + LocalizedProperty(outlineAlphaToMask); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendOutline, GetLoc("sForward"), outlineSrcBlend, outlineDstBlend, outlineSrcBlendAlpha, outlineDstBlendAlpha, outlineBlendOp, outlineBlendOpAlpha); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendAddOutline, GetLoc("sForwardAdd"), outlineSrcBlendFA, outlineDstBlendFA, outlineSrcBlendAlphaFA, outlineDstBlendAlphaFA, outlineBlendOpFA, outlineBlendOpAlphaFA); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Fur + if(isFur) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sFur"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + LocalizedProperty(furCull); + LocalizedProperty(furZclip); + LocalizedProperty(furZwrite); + LocalizedProperty(furZtest); + LocalizedProperty(furOffsetFactor); + LocalizedProperty(furOffsetUnits); + LocalizedProperty(furColorMask); + LocalizedProperty(furAlphaToMask); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendFur, GetLoc("sForward"), furSrcBlend, furDstBlend, furSrcBlendAlpha, furDstBlendAlpha, furBlendOp, furBlendOpAlpha); + lilEditorGUI.DrawLine(); + BlendSettingGUI(ref edSet.isShowBlendAddFur, GetLoc("sForwardAdd"), furSrcBlendFA, furDstBlendFA, furSrcBlendAlphaFA, furDstBlendAlphaFA, furBlendOpFA, furBlendOpAlphaFA); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Light Bake + if(ShouldDrawBlock("Double Sided Global Illumination", "Global Illumination")) + { + edSet.isShowLightBake = lilEditorGUI.Foldout(GetLoc("sLightBakeSetting"), edSet.isShowLightBake); + //DrawMenuButton(GetLoc("sAnchorLightBake"), PropertyBlock.LightBake); + if(edSet.isShowLightBake) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sLightBakeSetting"), customToggleFont); + EditorGUILayout.BeginVertical(boxInner); + if(!isCustomEditor) DoubleSidedGIField(); + if(!isCustomEditor) LightmapEmissionFlagsProperty(); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Tessellation + if(ShouldDrawBlock(PropertyBlock.Tessellation)) + { + edSet.isShowTess = lilEditorGUI.Foldout(GetLoc("sTessellation"), edSet.isShowTess); + DrawMenuButton(GetLoc("sAnchorTessellation"), PropertyBlock.Tessellation); + if(edSet.isShowTess) + { + EditorGUILayout.BeginVertical(boxOuter); + if(isTess != EditorGUILayout.ToggleLeft(GetLoc("sTessellation"), isTess, customToggleFont)) + { + isTess = !isTess; + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + } + if(isTess) + { + EditorGUILayout.BeginVertical(boxInner); + LocalizedProperty(tessEdge); + LocalizedProperty(tessStrength); + LocalizedProperty(tessShrink); + LocalizedProperty(tessFactorMax); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + EditorGUILayout.Space(); + + //------------------------------------------------------------------------------------------------------------------------------ + // Optimization + if(!isMultiVariants && ShouldDrawBlock()) + { + GUILayout.Label(GetLoc("sOptimization"), boldLabel); + edSet.isShowOptimization = lilEditorGUI.Foldout(GetLoc("sOptimization"), edSet.isShowOptimization); + lilEditorGUI.DrawHelpButton(GetLoc("sAnchorOptimization")); + if(edSet.isShowOptimization) + { + // Optimization + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sOptimization"), customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + DrawOptimizationButton(material, !(isLite && isMulti)); + lilEditorGUI.RemoveUnusedPropertiesGUI(material); + TextureBakeGUI(material, 0); + TextureBakeGUI(material, 1); + TextureBakeGUI(material, 2); + TextureBakeGUI(material, 3); + if(lilEditorGUI.Button(GetLoc("sConvertLite"))) CreateLiteMaterial(material); + if(mtoon != null && lilEditorGUI.Button(GetLoc("sConvertMToon"))) CreateMToonMaterial(material); + if(!isMulti && !isFur && !isRefr && !isGem && lilEditorGUI.Button(GetLoc("sConvertMulti"))) CreateMultiMaterial(material); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + + // Bake Textures + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sBake"), customToggleFont); + EditorGUILayout.BeginVertical(boxInnerHalf); + if(!isGem && lilEditorGUI.Button(GetLoc("sShadow1stColor"))) AutoBakeColoredMask(material, shadowColorTex, shadowColor, "Shadow1stColor"); + if(!isGem && lilEditorGUI.Button(GetLoc("sShadow2ndColor"))) AutoBakeColoredMask(material, shadow2ndColorTex, shadow2ndColor, "Shadow2ndColor"); + if(!isGem && lilEditorGUI.Button(GetLoc("sShadow3rdColor"))) AutoBakeColoredMask(material, shadow3rdColorTex, shadow3rdColor, "Shadow3rdColor"); + if(!isGem && lilEditorGUI.Button(GetLoc("sReflection"))) AutoBakeColoredMask(material, reflectionColorTex, reflectionColor, "ReflectionColor"); + if(lilEditorGUI.Button(GetLoc("sMatCap"))) AutoBakeColoredMask(material, matcapBlendMask, matcapColor, "MatCapColor"); + if(lilEditorGUI.Button(GetLoc("sMatCap2nd"))) AutoBakeColoredMask(material, matcap2ndBlendMask, matcap2ndColor, "MatCap2ndColor"); + if(lilEditorGUI.Button(GetLoc("sRimLight"))) AutoBakeColoredMask(material, rimColorTex, rimColor, "RimColor"); + if(((!isRefr && !isFur && !isGem && !isCustomShader) || (isCustomShader && isOutl)) && lilEditorGUI.EditorButton(GetLoc("sSettingTexOutlineColor"))) AutoBakeColoredMask(material, outlineColorMask, outlineColor, "OutlineColor"); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + } + } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs.meta new file mode 100644 index 00000000..b08e7e72 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilMainInspectorGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 92266b321bdac014d8608024f89858b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs b/Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs new file mode 100644 index 00000000..088134cd --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs @@ -0,0 +1,457 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + //------------------------------------------------------------------------------------------------------------------------------ + // Material Setup + #region + public static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool istess, bool ismulti) + { + if(!isMultiVariants) lilMaterialUtils.SetupMaterialWithRenderingMode(material, renderingMode, transparentMode, isoutl, islite, istess, ismulti); + } + + public static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool istess) + { + SetupMaterialWithRenderingMode(material, renderingMode, transparentMode, isoutl, islite, istess, isMulti); + } + + public static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode) + { + SetupMaterialWithRenderingMode(material, renderingMode, transparentMode, isOutl, isLite, isTess); + } + + private void SetupMaterialWithRenderingMode(RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool istess, bool ismulti) + { + foreach(var material in materials) SetupMaterialWithRenderingMode(material, renderingMode, transparentMode, isoutl, islite, istess, ismulti); + } + + private void SetupMaterialWithRenderingMode(RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool istess) + { + foreach(var material in materials) SetupMaterialWithRenderingMode(material, renderingMode, transparentMode, isoutl, islite, istess); + } + + private void SetupMaterialWithRenderingMode(RenderingMode renderingMode, TransparentMode transparentMode) + { + foreach(var material in materials) SetupMaterialWithRenderingMode(material, renderingMode, transparentMode); + } + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Material Converter + #region + private void CreateMToonMaterial(Material material) + { + var mtoonMaterial = new Material(mtoon); + + string matPath = AssetDatabase.GetAssetPath(material); + if(!string.IsNullOrEmpty(matPath)) matPath = EditorUtility.SaveFilePanel("Save Material", Path.GetDirectoryName(matPath), Path.GetFileNameWithoutExtension(matPath)+"_mtoon", "mat"); + else matPath = EditorUtility.SaveFilePanel("Save Material", "Assets", material.name + ".mat", "mat"); + if(!string.IsNullOrEmpty(matPath)) AssetDatabase.CreateAsset(mtoonMaterial, FileUtil.GetProjectRelativePath(matPath)); + + mtoonMaterial.SetColor("_Color", new Color(Mathf.Clamp01(mainColor.colorValue.r), Mathf.Clamp01(mainColor.colorValue.g), Mathf.Clamp01(mainColor.colorValue.b), Mathf.Clamp01(mainColor.colorValue.a))); + mtoonMaterial.SetFloat("_LightColorAttenuation", 0.0f); + mtoonMaterial.SetFloat("_IndirectLightIntensity", 0.0f); + + mtoonMaterial.SetFloat("_UvAnimScrollX", mainTex_ScrollRotate.vectorValue.x); + mtoonMaterial.SetFloat("_UvAnimScrollY", mainTex_ScrollRotate.vectorValue.y); + mtoonMaterial.SetFloat("_UvAnimRotation", mainTex_ScrollRotate.vectorValue.w / Mathf.PI * 0.5f); + mtoonMaterial.SetFloat("_MToonVersion", 35.0f); + mtoonMaterial.SetFloat("_DebugMode", 0.0f); + mtoonMaterial.SetFloat("_CullMode", cull.floatValue); + + var bakedMainTex = AutoBakeMainTexture(material); + mtoonMaterial.SetTexture("_MainTex", bakedMainTex); + + var mainScale = material.GetTextureScale(mainTex.name); + var mainOffset = material.GetTextureOffset(mainTex.name); + mtoonMaterial.SetTextureScale(mainTex.name, mainScale); + mtoonMaterial.SetTextureOffset(mainTex.name, mainOffset); + + if(useBumpMap.floatValue == 1.0f && bumpMap.textureValue != null) + { + mtoonMaterial.SetFloat("_BumpScale", bumpScale.floatValue); + mtoonMaterial.SetTexture("_BumpMap", bumpMap.textureValue); + mtoonMaterial.EnableKeyword("_NORMALMAP"); + } + + if(useShadow.floatValue == 1.0f) + { + float shadeShift = (Mathf.Clamp01(shadowBorder.floatValue - (shadowBlur.floatValue * 0.5f)) * 2.0f) - 1.0f; + float shadeToony = (2.0f - (Mathf.Clamp01(shadowBorder.floatValue + (shadowBlur.floatValue * 0.5f)) * 2.0f)) / (1.0f - shadeShift); + if(shadowStrengthMask.textureValue != null || shadowMainStrength.floatValue != 0.0f) + { + var bakedShadowTex = AutoBakeShadowTexture(material, bakedMainTex); + mtoonMaterial.SetColor("_ShadeColor", Color.white); + mtoonMaterial.SetTexture("_ShadeTexture", bakedShadowTex); + } + else + { + var shadeColorStrength = new Color( + 1.0f - ((1.0f - shadowColor.colorValue.r) * shadowStrength.floatValue), + 1.0f - ((1.0f - shadowColor.colorValue.g) * shadowStrength.floatValue), + 1.0f - ((1.0f - shadowColor.colorValue.b) * shadowStrength.floatValue), + 1.0f + ); + mtoonMaterial.SetColor("_ShadeColor", shadeColorStrength); + if(shadowColorTex.textureValue != null) + { + mtoonMaterial.SetTexture("_ShadeTexture", shadowColorTex.textureValue); + } + else + { + mtoonMaterial.SetTexture("_ShadeTexture", bakedMainTex); + } + } + mtoonMaterial.SetFloat("_ReceiveShadowRate", 1.0f); + mtoonMaterial.SetTexture("_ReceiveShadowTexture", null); + mtoonMaterial.SetFloat("_ShadingGradeRate", 1.0f); + mtoonMaterial.SetTexture("_ShadingGradeTexture", shadowBorderMask.textureValue); + mtoonMaterial.SetFloat("_ShadeShift", shadeShift); + mtoonMaterial.SetFloat("_ShadeToony", shadeToony); + } + else + { + mtoonMaterial.SetColor("_ShadeColor", Color.white); + mtoonMaterial.SetTexture("_ShadeTexture", bakedMainTex); + } + + if(useEmission.floatValue == 1.0f && emissionMap.textureValue != null) + { + mtoonMaterial.SetColor("_EmissionColor", emissionColor.colorValue); + mtoonMaterial.SetTexture("_EmissionMap", emissionMap.textureValue); + } + + if(useRim.floatValue == 1.0f) + { + mtoonMaterial.SetColor("_RimColor", rimColor.colorValue); + mtoonMaterial.SetTexture("_RimTexture", rimColorTex.textureValue); + mtoonMaterial.SetFloat("_RimLightingMix", rimEnableLighting.floatValue); + + float rimFP = rimFresnelPower.floatValue / Mathf.Max(0.001f, rimBlur.floatValue); + float rimLift = Mathf.Pow(1.0f - rimBorder.floatValue, rimFresnelPower.floatValue) * (1.0f - rimBlur.floatValue); + mtoonMaterial.SetFloat("_RimFresnelPower", rimFP); + mtoonMaterial.SetFloat("_RimLift", rimLift); + } + else + { + mtoonMaterial.SetColor("_RimColor", Color.black); + } + + if(useMatCap.floatValue == 1.0f && matcapBlendMode.floatValue != 3.0f && matcapTex.textureValue != null) + { + var bakedMatCap = AutoBakeMatCap(material); + mtoonMaterial.SetTexture("_SphereAdd", bakedMatCap); + } + + if(isOutl) + { + mtoonMaterial.SetTexture("_OutlineWidthTexture", outlineWidthMask.textureValue); + mtoonMaterial.SetFloat("_OutlineWidth", outlineWidth.floatValue); + mtoonMaterial.SetColor("_OutlineColor", outlineColor.colorValue); + mtoonMaterial.SetFloat("_OutlineLightingMix", 1.0f); + mtoonMaterial.SetFloat("_OutlineWidthMode", 1.0f); + mtoonMaterial.SetFloat("_OutlineColorMode", 1.0f); + mtoonMaterial.SetFloat("_OutlineCullMode", 1.0f); + mtoonMaterial.EnableKeyword("MTOON_OUTLINE_WIDTH_WORLD"); + mtoonMaterial.EnableKeyword("MTOON_OUTLINE_COLOR_MIXED"); + } + + if(isCutout) + { + mtoonMaterial.SetFloat("_Cutoff", cutoff.floatValue); + mtoonMaterial.SetFloat("_BlendMode", 1.0f); + mtoonMaterial.SetOverrideTag("RenderType", "TransparentCutout"); + mtoonMaterial.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One); + mtoonMaterial.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero); + mtoonMaterial.SetFloat("_ZWrite", 1.0f); + mtoonMaterial.SetFloat("_AlphaToMask", 1.0f); + mtoonMaterial.EnableKeyword("_ALPHATEST_ON"); + mtoonMaterial.renderQueue = (int)RenderQueue.AlphaTest; + } + else if(isTransparent && zwrite.floatValue == 0.0f) + { + mtoonMaterial.SetFloat("_BlendMode", 2.0f); + mtoonMaterial.SetOverrideTag("RenderType", "TransparentCutout"); + mtoonMaterial.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha); + mtoonMaterial.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + mtoonMaterial.SetFloat("_ZWrite", 0.0f); + mtoonMaterial.SetFloat("_AlphaToMask", 0.0f); + mtoonMaterial.EnableKeyword("_ALPHABLEND_ON"); + mtoonMaterial.renderQueue = (int)RenderQueue.Transparent; + } + else if(isTransparent && zwrite.floatValue != 0.0f) + { + mtoonMaterial.SetFloat("_BlendMode", 3.0f); + mtoonMaterial.SetOverrideTag("RenderType", "TransparentCutout"); + mtoonMaterial.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha); + mtoonMaterial.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + mtoonMaterial.SetFloat("_ZWrite", 1.0f); + mtoonMaterial.SetFloat("_AlphaToMask", 0.0f); + mtoonMaterial.EnableKeyword("_ALPHABLEND_ON"); + mtoonMaterial.renderQueue = (int)RenderQueue.Transparent; + } + else + { + mtoonMaterial.SetFloat("_BlendMode", 0.0f); + mtoonMaterial.SetOverrideTag("RenderType", "Opaque"); + mtoonMaterial.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One); + mtoonMaterial.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero); + mtoonMaterial.SetFloat("_ZWrite", 1.0f); + mtoonMaterial.SetFloat("_AlphaToMask", 0.0f); + mtoonMaterial.renderQueue = -1; + } + } + + private void CreateLiteMaterial(Material material) + { + var liteMaterial = new Material(ltsl); + var renderingMode = renderingModeBuf; + if(renderingMode == RenderingMode.Refraction) renderingMode = RenderingMode.Transparent; + if(renderingMode == RenderingMode.RefractionBlur) renderingMode = RenderingMode.Transparent; + if(renderingMode == RenderingMode.Fur) renderingMode = RenderingMode.Transparent; + if(renderingMode == RenderingMode.FurCutout) renderingMode = RenderingMode.Cutout; + if(renderingMode == RenderingMode.FurTwoPass) renderingMode = RenderingMode.Transparent; + + bool isonepass = material.shader.name.Contains("OnePass"); + bool istwopass = material.shader.name.Contains("TwoPass"); + + var transparentMode = TransparentMode.Normal; + if(isonepass) transparentMode = TransparentMode.OnePass; + if(istwopass) transparentMode = TransparentMode.TwoPass; + + SetupMaterialWithRenderingMode(liteMaterial, renderingMode, transparentMode, isOutl, true, isStWr, false); + + string matPath = AssetDatabase.GetAssetPath(material); + if(!string.IsNullOrEmpty(matPath)) matPath = EditorUtility.SaveFilePanel("Save Material", Path.GetDirectoryName(matPath), Path.GetFileNameWithoutExtension(matPath)+"_lite", "mat"); + else matPath = EditorUtility.SaveFilePanel("Save Material", "Assets", material.name + ".mat", "mat"); + if(string.IsNullOrEmpty(matPath)) return; + else AssetDatabase.CreateAsset(liteMaterial, FileUtil.GetProjectRelativePath(matPath)); + + liteMaterial.SetFloat("_Invisible", invisible.floatValue); + liteMaterial.SetFloat("_Cutoff", cutoff.floatValue); + liteMaterial.SetFloat("_SubpassCutoff", subpassCutoff.floatValue); + liteMaterial.SetFloat("_Cull", cull.floatValue); + liteMaterial.SetFloat("_FlipNormal", flipNormal.floatValue); + liteMaterial.SetFloat("_BackfaceForceShadow", backfaceForceShadow.floatValue); + + liteMaterial.SetColor("_Color", mainColor.colorValue); + liteMaterial.SetVector("_MainTex_ScrollRotate", mainTex_ScrollRotate.vectorValue); + + var bakedMainTex = AutoBakeMainTexture(material); + liteMaterial.SetTexture("_MainTex", bakedMainTex); + + var mainScale = material.GetTextureScale(mainTex.name); + var mainOffset = material.GetTextureOffset(mainTex.name); + liteMaterial.SetTextureScale(mainTex.name, mainScale); + liteMaterial.SetTextureOffset(mainTex.name, mainOffset); + + liteMaterial.SetFloat("_UseShadow", useShadow.floatValue); + if(useShadow.floatValue == 1.0f) + { + var bakedShadowTex = AutoBakeShadowTexture(material, bakedMainTex, 1, false); + liteMaterial.SetFloat("_ShadowBorder", shadowBorder.floatValue); + liteMaterial.SetFloat("_ShadowBlur", shadowBlur.floatValue); + liteMaterial.SetTexture("_ShadowColorTex", bakedShadowTex); + if(shadow2ndColor.colorValue.a != 0.0f) + { + var bakedShadow2ndTex = AutoBakeShadowTexture(material, bakedMainTex, 2, false); + liteMaterial.SetFloat("_Shadow2ndBorder", shadow2ndBorder.floatValue); + liteMaterial.SetFloat("_Shadow2ndBlur", shadow2ndBlur.floatValue); + liteMaterial.SetTexture("_Shadow2ndColorTex", bakedShadow2ndTex); + } + liteMaterial.SetFloat("_ShadowEnvStrength", shadowEnvStrength.floatValue); + liteMaterial.SetColor("_ShadowBorderColor", shadowBorderColor.colorValue); + liteMaterial.SetFloat("_ShadowBorderRange", shadowBorderRange.floatValue); + } + + if(isOutl) + { + var bakedOutlineTex = AutoBakeOutlineTexture(material); + liteMaterial.SetColor("_OutlineColor", outlineColor.colorValue); + liteMaterial.SetTexture("_OutlineTex", bakedOutlineTex); + liteMaterial.SetVector("_OutlineTex_ScrollRotate", outlineTex_ScrollRotate.vectorValue); + liteMaterial.SetTexture("_OutlineWidthMask", outlineWidthMask.textureValue); + liteMaterial.SetFloat("_OutlineWidth", outlineWidth.floatValue); + liteMaterial.SetFloat("_OutlineFixWidth", outlineFixWidth.floatValue); + liteMaterial.SetFloat("_OutlineVertexR2Width", outlineVertexR2Width.floatValue); + liteMaterial.SetFloat("_OutlineDeleteMesh", outlineDeleteMesh.floatValue); + liteMaterial.SetFloat("_OutlineEnableLighting", outlineEnableLighting.floatValue); + liteMaterial.SetFloat("_OutlineZBias", outlineZBias.floatValue); + liteMaterial.SetFloat("_OutlineSrcBlend", outlineSrcBlend.floatValue); + liteMaterial.SetFloat("_OutlineDstBlend", outlineDstBlend.floatValue); + liteMaterial.SetFloat("_OutlineBlendOp", outlineBlendOp.floatValue); + liteMaterial.SetFloat("_OutlineSrcBlendFA", outlineSrcBlendFA.floatValue); + liteMaterial.SetFloat("_OutlineDstBlendFA", outlineDstBlendFA.floatValue); + liteMaterial.SetFloat("_OutlineBlendOpFA", outlineBlendOpFA.floatValue); + liteMaterial.SetFloat("_OutlineZWrite", outlineZwrite.floatValue); + liteMaterial.SetFloat("_OutlineZTest", outlineZtest.floatValue); + liteMaterial.SetFloat("_OutlineAlphaToMask", outlineAlphaToMask.floatValue); + liteMaterial.SetFloat("_OutlineStencilRef", outlineStencilRef.floatValue); + liteMaterial.SetFloat("_OutlineStencilReadMask", outlineStencilReadMask.floatValue); + liteMaterial.SetFloat("_OutlineStencilWriteMask", outlineStencilWriteMask.floatValue); + liteMaterial.SetFloat("_OutlineStencilComp", outlineStencilComp.floatValue); + liteMaterial.SetFloat("_OutlineStencilPass", outlineStencilPass.floatValue); + liteMaterial.SetFloat("_OutlineStencilFail", outlineStencilFail.floatValue); + liteMaterial.SetFloat("_OutlineStencilZFail", outlineStencilZFail.floatValue); + } + + var bakedMatCap = AutoBakeMatCap(liteMaterial); + if(bakedMatCap != null) + { + liteMaterial.SetTexture("_MatCapTex", bakedMatCap); + liteMaterial.SetFloat("_UseMatCap", useMatCap.floatValue); + liteMaterial.SetFloat("_MatCapBlendUV1", matcapBlendUV1.floatValue); + liteMaterial.SetFloat("_MatCapZRotCancel", matcapZRotCancel.floatValue); + liteMaterial.SetFloat("_MatCapPerspective", matcapPerspective.floatValue); + liteMaterial.SetFloat("_MatCapVRParallaxStrength", matcapVRParallaxStrength.floatValue); + if(matcapBlendMode.floatValue == 3) liteMaterial.SetFloat("_MatCapMul", useMatCap.floatValue); + else liteMaterial.SetFloat("_MatCapMul", useMatCap.floatValue); + } + + liteMaterial.SetFloat("_UseRim", useRim.floatValue); + if(useRim.floatValue == 1.0f) + { + liteMaterial.SetColor("_RimColor", rimColor.colorValue); + liteMaterial.SetFloat("_RimBorder", rimBorder.floatValue); + liteMaterial.SetFloat("_RimBlur", rimBlur.floatValue); + liteMaterial.SetFloat("_RimFresnelPower", rimFresnelPower.floatValue); + liteMaterial.SetFloat("_RimShadowMask", rimShadowMask.floatValue); + } + + if(useEmission.floatValue == 1.0f) + { + liteMaterial.SetFloat("_UseEmission", useEmission.floatValue); + liteMaterial.SetColor("_EmissionColor", emissionColor.colorValue); + liteMaterial.SetTexture("_EmissionMap", emissionMap.textureValue); + liteMaterial.SetFloat("_EmissionMap_UVMode", emissionMap_UVMode.floatValue); + liteMaterial.SetVector("_EmissionMap_ScrollRotate", emissionMap_ScrollRotate.vectorValue); + liteMaterial.SetVector("_EmissionBlink", emissionBlink.vectorValue); + } + + var bakedTriMask = AutoBakeTriMask(liteMaterial); + if(bakedTriMask != null) liteMaterial.SetTexture("_TriMask", bakedTriMask); + + liteMaterial.SetFloat("_SrcBlend", srcBlend.floatValue); + liteMaterial.SetFloat("_DstBlend", dstBlend.floatValue); + liteMaterial.SetFloat("_BlendOp", blendOp.floatValue); + liteMaterial.SetFloat("_SrcBlendFA", srcBlendFA.floatValue); + liteMaterial.SetFloat("_DstBlendFA", dstBlendFA.floatValue); + liteMaterial.SetFloat("_BlendOpFA", blendOpFA.floatValue); + liteMaterial.SetFloat("_ZClip", zclip.floatValue); + liteMaterial.SetFloat("_ZWrite", zwrite.floatValue); + liteMaterial.SetFloat("_ZTest", ztest.floatValue); + liteMaterial.SetFloat("_AlphaToMask", alphaToMask.floatValue); + liteMaterial.SetFloat("_StencilRef", stencilRef.floatValue); + liteMaterial.SetFloat("_StencilReadMask", stencilReadMask.floatValue); + liteMaterial.SetFloat("_StencilWriteMask", stencilWriteMask.floatValue); + liteMaterial.SetFloat("_StencilComp", stencilComp.floatValue); + liteMaterial.SetFloat("_StencilPass", stencilPass.floatValue); + liteMaterial.SetFloat("_StencilFail", stencilFail.floatValue); + liteMaterial.SetFloat("_StencilZFail", stencilZFail.floatValue); + liteMaterial.renderQueue = lilMaterialUtils.GetTrueRenderQueue(material); + } + + // TODO : Support other rendering mode + private void CreateMultiMaterial(Material material) + { + material.shader = ltsm; + if(isOutl) material.shader = ltsmo; + else material.shader = ltsm; + isMulti = true; + + if(renderingModeBuf == RenderingMode.Cutout) material.SetFloat("_TransparentMode", 1.0f); + else if(renderingModeBuf == RenderingMode.Transparent) material.SetFloat("_TransparentMode", 2.0f); + else material.SetFloat("_TransparentMode", 0.0f); + material.SetFloat("_UseClippingCanceller", 0.0f); + + if(shaderSetting.LIL_FEATURE_CLIPPING_CANCELLER) material.SetFloat("_UseClippingCanceller", 1.0f); + + SetupMaterialWithRenderingMode(material, renderingModeBuf, TransparentMode.Normal, isOutl, false, isStWr, true); + lilMaterialUtils.SetupMultiMaterial(material); + } + + protected virtual void ReplaceToCustomShaders() + { + } + + protected void ConvertMaterialToCustomShader(Material material) + { + lilShaderManager.InitializeShaders(); + var shader = material.shader; + if(shader == lts) { ReplaceToCustomShaders(); shader = lts ;} + else if(shader == ltsc) { ReplaceToCustomShaders(); shader = ltsc ;} + else if(shader == ltst) { ReplaceToCustomShaders(); shader = ltst ;} + else if(shader == ltsot) { ReplaceToCustomShaders(); shader = ltsot ;} + else if(shader == ltstt) { ReplaceToCustomShaders(); shader = ltstt ;} + else if(shader == ltso) { ReplaceToCustomShaders(); shader = ltso ;} + else if(shader == ltsco) { ReplaceToCustomShaders(); shader = ltsco ;} + else if(shader == ltsto) { ReplaceToCustomShaders(); shader = ltsto ;} + else if(shader == ltsoto) { ReplaceToCustomShaders(); shader = ltsoto ;} + else if(shader == ltstto) { ReplaceToCustomShaders(); shader = ltstto ;} + else if(shader == ltsoo) { ReplaceToCustomShaders(); shader = ltsoo ;} + else if(shader == ltscoo) { ReplaceToCustomShaders(); shader = ltscoo ;} + else if(shader == ltstoo) { ReplaceToCustomShaders(); shader = ltstoo ;} + else if(shader == ltstess) { ReplaceToCustomShaders(); shader = ltstess ;} + else if(shader == ltstessc) { ReplaceToCustomShaders(); shader = ltstessc ;} + else if(shader == ltstesst) { ReplaceToCustomShaders(); shader = ltstesst ;} + else if(shader == ltstessot) { ReplaceToCustomShaders(); shader = ltstessot ;} + else if(shader == ltstesstt) { ReplaceToCustomShaders(); shader = ltstesstt ;} + else if(shader == ltstesso) { ReplaceToCustomShaders(); shader = ltstesso ;} + else if(shader == ltstessco) { ReplaceToCustomShaders(); shader = ltstessco ;} + else if(shader == ltstessto) { ReplaceToCustomShaders(); shader = ltstessto ;} + else if(shader == ltstessoto) { ReplaceToCustomShaders(); shader = ltstessoto;} + else if(shader == ltstesstto) { ReplaceToCustomShaders(); shader = ltstesstto;} + else if(shader == ltsl) { ReplaceToCustomShaders(); shader = ltsl ;} + else if(shader == ltslc) { ReplaceToCustomShaders(); shader = ltslc ;} + else if(shader == ltslt) { ReplaceToCustomShaders(); shader = ltslt ;} + else if(shader == ltslot) { ReplaceToCustomShaders(); shader = ltslot ;} + else if(shader == ltsltt) { ReplaceToCustomShaders(); shader = ltsltt ;} + else if(shader == ltslo) { ReplaceToCustomShaders(); shader = ltslo ;} + else if(shader == ltslco) { ReplaceToCustomShaders(); shader = ltslco ;} + else if(shader == ltslto) { ReplaceToCustomShaders(); shader = ltslto ;} + else if(shader == ltsloto) { ReplaceToCustomShaders(); shader = ltsloto ;} + else if(shader == ltsltto) { ReplaceToCustomShaders(); shader = ltsltto ;} + else if(shader == ltsref) { ReplaceToCustomShaders(); shader = ltsref ;} + else if(shader == ltsrefb) { ReplaceToCustomShaders(); shader = ltsrefb ;} + else if(shader == ltsfur) { ReplaceToCustomShaders(); shader = ltsfur ;} + else if(shader == ltsfurc) { ReplaceToCustomShaders(); shader = ltsfurc ;} + else if(shader == ltsfurtwo) { ReplaceToCustomShaders(); shader = ltsfurtwo ;} + else if(shader == ltsfuro) { ReplaceToCustomShaders(); shader = ltsfuro ;} + else if(shader == ltsfuroc) { ReplaceToCustomShaders(); shader = ltsfuroc ;} + else if(shader == ltsfurotwo) { ReplaceToCustomShaders(); shader = ltsfurotwo;} + else if(shader == ltsgem) { ReplaceToCustomShaders(); shader = ltsgem ;} + else if(shader == ltsfs) { ReplaceToCustomShaders(); shader = ltsfs ;} + else if(shader == ltsover) { ReplaceToCustomShaders(); shader = ltsover ;} + else if(shader == ltsoover) { ReplaceToCustomShaders(); shader = ltsoover ;} + else if(shader == ltslover) { ReplaceToCustomShaders(); shader = ltslover ;} + else if(shader == ltsloover) { ReplaceToCustomShaders(); shader = ltsloover ;} + else if(shader == ltsm) { ReplaceToCustomShaders(); shader = ltsm ;} + else if(shader == ltsmo) { ReplaceToCustomShaders(); shader = ltsmo ;} + else if(shader == ltsmref) { ReplaceToCustomShaders(); shader = ltsmref ;} + else if(shader == ltsmfur) { ReplaceToCustomShaders(); shader = ltsmfur ;} + else if(shader == ltsmgem) { ReplaceToCustomShaders(); shader = ltsmgem ;} + + if(material.shader != shader && shader != null) + { + int renderQueue = lilMaterialUtils.GetTrueRenderQueue(material); + material.shader = shader; + material.renderQueue = renderQueue; + } + } + #endregion + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs.meta new file mode 100644 index 00000000..5cabbafa --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilMaterialConvertUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 09b8f441fc0cb7942b9c25d6f407a9bc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs b/Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs new file mode 100644 index 00000000..cb14f068 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs @@ -0,0 +1,1351 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + + //------------------------------------------------------------------------------------------------------------------------------ + // Material properties + private readonly lilMaterialProperty invisible = new lilMaterialProperty("_Invisible", PropertyBlock.Base); + private readonly lilMaterialProperty cutoff = new lilMaterialProperty("_Cutoff", PropertyBlock.Base); + private readonly lilMaterialProperty preColor = new lilMaterialProperty("_PreColor", PropertyBlock.Base); + private readonly lilMaterialProperty preOutType = new lilMaterialProperty("_PreOutType", PropertyBlock.Base); + private readonly lilMaterialProperty preCutoff = new lilMaterialProperty("_PreCutoff", PropertyBlock.Base); + private readonly lilMaterialProperty flipNormal = new lilMaterialProperty("_FlipNormal", PropertyBlock.Base); + private readonly lilMaterialProperty backfaceForceShadow = new lilMaterialProperty("_BackfaceForceShadow", PropertyBlock.Base); + private readonly lilMaterialProperty backfaceColor = new lilMaterialProperty("_BackfaceColor", PropertyBlock.Base); + private readonly lilMaterialProperty aaStrength = new lilMaterialProperty("_AAStrength", PropertyBlock.Base); + private readonly lilMaterialProperty useDither = new lilMaterialProperty("_UseDither", PropertyBlock.Base); + private readonly lilMaterialProperty ditherTex = new lilMaterialProperty("_DitherTex", PropertyBlock.Base); + private readonly lilMaterialProperty ditherMaxValue = new lilMaterialProperty("_DitherMaxValue", PropertyBlock.Base); + + private readonly lilMaterialProperty asUnlit = new lilMaterialProperty("_AsUnlit", PropertyBlock.Lighting); + private readonly lilMaterialProperty vertexLightStrength = new lilMaterialProperty("_VertexLightStrength", PropertyBlock.Lighting); + private readonly lilMaterialProperty lightMinLimit = new lilMaterialProperty("_LightMinLimit", PropertyBlock.Lighting); + private readonly lilMaterialProperty lightMaxLimit = new lilMaterialProperty("_LightMaxLimit", PropertyBlock.Lighting); + private readonly lilMaterialProperty beforeExposureLimit = new lilMaterialProperty("_BeforeExposureLimit", PropertyBlock.Lighting, PropertyBlock.Rendering); + private readonly lilMaterialProperty monochromeLighting = new lilMaterialProperty("_MonochromeLighting", PropertyBlock.Lighting); + private readonly lilMaterialProperty alphaBoostFA = new lilMaterialProperty("_AlphaBoostFA", PropertyBlock.Lighting); + private readonly lilMaterialProperty lilDirectionalLightStrength = new lilMaterialProperty("_lilDirectionalLightStrength", PropertyBlock.Lighting); + private readonly lilMaterialProperty lightDirectionOverride = new lilMaterialProperty("_LightDirectionOverride", PropertyBlock.Lighting); + + private readonly lilMaterialProperty baseColor = new lilMaterialProperty("_BaseColor"); + private readonly lilMaterialProperty baseMap = new lilMaterialProperty("_BaseMap", true); + private readonly lilMaterialProperty baseColorMap = new lilMaterialProperty("_BaseColorMap", true); + + private readonly lilMaterialProperty shiftBackfaceUV = new lilMaterialProperty("_ShiftBackfaceUV", PropertyBlock.UV); + private readonly lilMaterialProperty mainTex_ScrollRotate = new lilMaterialProperty("_MainTex_ScrollRotate", PropertyBlock.UV); + + private readonly lilMaterialProperty mainColor = new lilMaterialProperty("_Color", PropertyBlock.MainColor, PropertyBlock.MainColor1st); + private readonly lilMaterialProperty mainTex = new lilMaterialProperty("_MainTex", true, PropertyBlock.MainColor, PropertyBlock.MainColor1st); + private readonly lilMaterialProperty mainTexHSVG = new lilMaterialProperty("_MainTexHSVG", PropertyBlock.MainColor, PropertyBlock.MainColor1st); + private readonly lilMaterialProperty mainGradationStrength = new lilMaterialProperty("_MainGradationStrength", PropertyBlock.MainColor, PropertyBlock.MainColor1st); + private readonly lilMaterialProperty mainGradationTex = new lilMaterialProperty("_MainGradationTex", true, PropertyBlock.MainColor, PropertyBlock.MainColor1st); + private readonly lilMaterialProperty mainColorAdjustMask = new lilMaterialProperty("_MainColorAdjustMask", true, PropertyBlock.MainColor, PropertyBlock.MainColor1st); + + private readonly lilMaterialProperty useMain2ndTex = new lilMaterialProperty("_UseMain2ndTex", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty mainColor2nd = new lilMaterialProperty("_Color2nd", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTex = new lilMaterialProperty("_Main2ndTex", true, PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexAngle = new lilMaterialProperty("_Main2ndTexAngle", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTex_ScrollRotate = new lilMaterialProperty("_Main2ndTex_ScrollRotate", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTex_UVMode = new lilMaterialProperty("_Main2ndTex_UVMode", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTex_Cull = new lilMaterialProperty("_Main2ndTex_Cull", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexDecalAnimation = new lilMaterialProperty("_Main2ndTexDecalAnimation", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexDecalSubParam = new lilMaterialProperty("_Main2ndTexDecalSubParam", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexIsDecal = new lilMaterialProperty("_Main2ndTexIsDecal", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexIsLeftOnly = new lilMaterialProperty("_Main2ndTexIsLeftOnly", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexIsRightOnly = new lilMaterialProperty("_Main2ndTexIsRightOnly", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexShouldCopy = new lilMaterialProperty("_Main2ndTexShouldCopy", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexShouldFlipMirror = new lilMaterialProperty("_Main2ndTexShouldFlipMirror", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexShouldFlipCopy = new lilMaterialProperty("_Main2ndTexShouldFlipCopy", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexIsMSDF = new lilMaterialProperty("_Main2ndTexIsMSDF", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndBlendMask = new lilMaterialProperty("_Main2ndBlendMask", true, PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexBlendMode = new lilMaterialProperty("_Main2ndTexBlendMode", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndTexAlphaMode = new lilMaterialProperty("_Main2ndTexAlphaMode", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndEnableLighting = new lilMaterialProperty("_Main2ndEnableLighting", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDissolveMask = new lilMaterialProperty("_Main2ndDissolveMask", true, PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDissolveNoiseMask = new lilMaterialProperty("_Main2ndDissolveNoiseMask", true, PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDissolveNoiseMask_ScrollRotate = new lilMaterialProperty("_Main2ndDissolveNoiseMask_ScrollRotate", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDissolveNoiseStrength = new lilMaterialProperty("_Main2ndDissolveNoiseStrength", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDissolveColor = new lilMaterialProperty("_Main2ndDissolveColor", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDissolveParams = new lilMaterialProperty("_Main2ndDissolveParams", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDissolvePos = new lilMaterialProperty("_Main2ndDissolvePos", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + private readonly lilMaterialProperty main2ndDistanceFade = new lilMaterialProperty("_Main2ndDistanceFade", PropertyBlock.MainColor, PropertyBlock.MainColor2nd); + + private readonly lilMaterialProperty useMain3rdTex = new lilMaterialProperty("_UseMain3rdTex", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty mainColor3rd = new lilMaterialProperty("_Color3rd", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexAngle = new lilMaterialProperty("_Main3rdTexAngle", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTex_ScrollRotate = new lilMaterialProperty("_Main3rdTex_ScrollRotate", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTex = new lilMaterialProperty("_Main3rdTex", true, PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTex_UVMode = new lilMaterialProperty("_Main3rdTex_UVMode", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTex_Cull = new lilMaterialProperty("_Main3rdTex_Cull", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexDecalAnimation = new lilMaterialProperty("_Main3rdTexDecalAnimation", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexDecalSubParam = new lilMaterialProperty("_Main3rdTexDecalSubParam", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexIsDecal = new lilMaterialProperty("_Main3rdTexIsDecal", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexIsLeftOnly = new lilMaterialProperty("_Main3rdTexIsLeftOnly", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexIsRightOnly = new lilMaterialProperty("_Main3rdTexIsRightOnly", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexShouldCopy = new lilMaterialProperty("_Main3rdTexShouldCopy", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexShouldFlipMirror = new lilMaterialProperty("_Main3rdTexShouldFlipMirror", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexShouldFlipCopy = new lilMaterialProperty("_Main3rdTexShouldFlipCopy", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexIsMSDF = new lilMaterialProperty("_Main3rdTexIsMSDF", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdBlendMask = new lilMaterialProperty("_Main3rdBlendMask", true, PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexBlendMode = new lilMaterialProperty("_Main3rdTexBlendMode", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdTexAlphaMode = new lilMaterialProperty("_Main3rdTexAlphaMode", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdEnableLighting = new lilMaterialProperty("_Main3rdEnableLighting", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDissolveMask = new lilMaterialProperty("_Main3rdDissolveMask", true, PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDissolveNoiseMask = new lilMaterialProperty("_Main3rdDissolveNoiseMask", true, PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDissolveNoiseMask_ScrollRotate = new lilMaterialProperty("_Main3rdDissolveNoiseMask_ScrollRotate", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDissolveNoiseStrength = new lilMaterialProperty("_Main3rdDissolveNoiseStrength", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDissolveColor = new lilMaterialProperty("_Main3rdDissolveColor", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDissolveParams = new lilMaterialProperty("_Main3rdDissolveParams", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDissolvePos = new lilMaterialProperty("_Main3rdDissolvePos", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + private readonly lilMaterialProperty main3rdDistanceFade = new lilMaterialProperty("_Main3rdDistanceFade", PropertyBlock.MainColor, PropertyBlock.MainColor3rd); + + private readonly lilMaterialProperty alphaMaskMode = new lilMaterialProperty("_AlphaMaskMode", PropertyBlock.MainColor, PropertyBlock.AlphaMask); + private readonly lilMaterialProperty alphaMask = new lilMaterialProperty("_AlphaMask", true, PropertyBlock.MainColor, PropertyBlock.AlphaMask); + private readonly lilMaterialProperty alphaMaskScale = new lilMaterialProperty("_AlphaMaskScale", PropertyBlock.MainColor, PropertyBlock.AlphaMask); + private readonly lilMaterialProperty alphaMaskValue = new lilMaterialProperty("_AlphaMaskValue", PropertyBlock.MainColor, PropertyBlock.AlphaMask); + + private readonly lilMaterialProperty useShadow = new lilMaterialProperty("_UseShadow", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowStrength = new lilMaterialProperty("_ShadowStrength", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowStrengthMask = new lilMaterialProperty("_ShadowStrengthMask", true, PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowBorderMask = new lilMaterialProperty("_ShadowBorderMask", true, PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowBlurMask = new lilMaterialProperty("_ShadowBlurMask", true, PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowStrengthMaskLOD = new lilMaterialProperty("_ShadowStrengthMaskLOD", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowBorderMaskLOD = new lilMaterialProperty("_ShadowBorderMaskLOD", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowBlurMaskLOD = new lilMaterialProperty("_ShadowBlurMaskLOD", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowAOShift = new lilMaterialProperty("_ShadowAOShift", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowAOShift2 = new lilMaterialProperty("_ShadowAOShift2", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowPostAO = new lilMaterialProperty("_ShadowPostAO", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowColorType = new lilMaterialProperty("_ShadowColorType", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowColor = new lilMaterialProperty("_ShadowColor", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowColorTex = new lilMaterialProperty("_ShadowColorTex", true, PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowNormalStrength = new lilMaterialProperty("_ShadowNormalStrength", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowBorder = new lilMaterialProperty("_ShadowBorder", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowBlur = new lilMaterialProperty("_ShadowBlur", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow2ndColor = new lilMaterialProperty("_Shadow2ndColor", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow2ndColorTex = new lilMaterialProperty("_Shadow2ndColorTex", true, PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow2ndNormalStrength = new lilMaterialProperty("_Shadow2ndNormalStrength", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow2ndBorder = new lilMaterialProperty("_Shadow2ndBorder", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow2ndBlur = new lilMaterialProperty("_Shadow2ndBlur", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow3rdColor = new lilMaterialProperty("_Shadow3rdColor", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow3rdColorTex = new lilMaterialProperty("_Shadow3rdColorTex", true, PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow3rdNormalStrength = new lilMaterialProperty("_Shadow3rdNormalStrength", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow3rdBorder = new lilMaterialProperty("_Shadow3rdBorder", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow3rdBlur = new lilMaterialProperty("_Shadow3rdBlur", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowMainStrength = new lilMaterialProperty("_ShadowMainStrength", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowEnvStrength = new lilMaterialProperty("_ShadowEnvStrength", PropertyBlock.Shadow, PropertyBlock.Lighting); + private readonly lilMaterialProperty shadowBorderColor = new lilMaterialProperty("_ShadowBorderColor", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowBorderRange = new lilMaterialProperty("_ShadowBorderRange", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowReceive = new lilMaterialProperty("_ShadowReceive", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow2ndReceive = new lilMaterialProperty("_Shadow2ndReceive", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadow3rdReceive = new lilMaterialProperty("_Shadow3rdReceive", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowMaskType = new lilMaterialProperty("_ShadowMaskType", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowFlatBorder = new lilMaterialProperty("_ShadowFlatBorder", PropertyBlock.Shadow); + private readonly lilMaterialProperty shadowFlatBlur = new lilMaterialProperty("_ShadowFlatBlur", PropertyBlock.Shadow); + private readonly lilMaterialProperty lilShadowCasterBias = new lilMaterialProperty("_lilShadowCasterBias", PropertyBlock.Shadow, PropertyBlock.Rendering); + + private readonly lilMaterialProperty useRimShade = new lilMaterialProperty("_UseRimShade", PropertyBlock.RimShade); + private readonly lilMaterialProperty rimShadeColor = new lilMaterialProperty("_RimShadeColor", PropertyBlock.RimShade); + private readonly lilMaterialProperty rimShadeMask = new lilMaterialProperty("_RimShadeMask", PropertyBlock.RimShade); + private readonly lilMaterialProperty rimShadeNormalStrength = new lilMaterialProperty("_RimShadeNormalStrength", PropertyBlock.RimShade); + private readonly lilMaterialProperty rimShadeBorder = new lilMaterialProperty("_RimShadeBorder", PropertyBlock.RimShade); + private readonly lilMaterialProperty rimShadeBlur = new lilMaterialProperty("_RimShadeBlur", PropertyBlock.RimShade); + private readonly lilMaterialProperty rimShadeFresnelPower = new lilMaterialProperty("_RimShadeFresnelPower", PropertyBlock.RimShade); + + private readonly lilMaterialProperty useEmission = new lilMaterialProperty("_UseEmission", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionColor = new lilMaterialProperty("_EmissionColor", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionMap = new lilMaterialProperty("_EmissionMap", true, PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionMap_ScrollRotate = new lilMaterialProperty("_EmissionMap_ScrollRotate", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionMap_UVMode = new lilMaterialProperty("_EmissionMap_UVMode", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionMainStrength = new lilMaterialProperty("_EmissionMainStrength", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionBlend = new lilMaterialProperty("_EmissionBlend", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionBlendMask = new lilMaterialProperty("_EmissionBlendMask", true, PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionBlendMask_ScrollRotate = new lilMaterialProperty("_EmissionBlendMask_ScrollRotate", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionBlendMode = new lilMaterialProperty("_EmissionBlendMode", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionBlink = new lilMaterialProperty("_EmissionBlink", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionUseGrad = new lilMaterialProperty("_EmissionUseGrad", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionGradTex = new lilMaterialProperty("_EmissionGradTex", true, PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionGradSpeed = new lilMaterialProperty("_EmissionGradSpeed", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionParallaxDepth = new lilMaterialProperty("_EmissionParallaxDepth", PropertyBlock.Emission, PropertyBlock.Emission1st); + private readonly lilMaterialProperty emissionFluorescence = new lilMaterialProperty("_EmissionFluorescence", PropertyBlock.Emission, PropertyBlock.Emission1st); + + private readonly lilMaterialProperty useEmission2nd = new lilMaterialProperty("_UseEmission2nd", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndColor = new lilMaterialProperty("_Emission2ndColor", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndMap = new lilMaterialProperty("_Emission2ndMap", true, PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndMap_ScrollRotate = new lilMaterialProperty("_Emission2ndMap_ScrollRotate", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndMap_UVMode = new lilMaterialProperty("_Emission2ndMap_UVMode", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndMainStrength = new lilMaterialProperty("_Emission2ndMainStrength", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndBlend = new lilMaterialProperty("_Emission2ndBlend", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndBlendMask = new lilMaterialProperty("_Emission2ndBlendMask", true, PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndBlendMask_ScrollRotate = new lilMaterialProperty("_Emission2ndBlendMask_ScrollRotate", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndBlendMode = new lilMaterialProperty("_Emission2ndBlendMode", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndBlink = new lilMaterialProperty("_Emission2ndBlink", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndUseGrad = new lilMaterialProperty("_Emission2ndUseGrad", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndGradTex = new lilMaterialProperty("_Emission2ndGradTex", true, PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndGradSpeed = new lilMaterialProperty("_Emission2ndGradSpeed", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndParallaxDepth = new lilMaterialProperty("_Emission2ndParallaxDepth", PropertyBlock.Emission, PropertyBlock.Emission2nd); + private readonly lilMaterialProperty emission2ndFluorescence = new lilMaterialProperty("_Emission2ndFluorescence", PropertyBlock.Emission, PropertyBlock.Emission2nd); + + private readonly lilMaterialProperty useBumpMap = new lilMaterialProperty("_UseBumpMap", PropertyBlock.NormalMap, PropertyBlock.NormalMap1st); + private readonly lilMaterialProperty bumpMap = new lilMaterialProperty("_BumpMap", true, PropertyBlock.NormalMap, PropertyBlock.NormalMap1st); + private readonly lilMaterialProperty bumpScale = new lilMaterialProperty("_BumpScale", PropertyBlock.NormalMap, PropertyBlock.NormalMap1st); + + private readonly lilMaterialProperty useBump2ndMap = new lilMaterialProperty("_UseBump2ndMap", PropertyBlock.NormalMap, PropertyBlock.NormalMap2nd); + private readonly lilMaterialProperty bump2ndMap = new lilMaterialProperty("_Bump2ndMap", true, PropertyBlock.NormalMap, PropertyBlock.NormalMap2nd); + private readonly lilMaterialProperty bump2ndMap_UVMode = new lilMaterialProperty("_Bump2ndMap_UVMode", PropertyBlock.NormalMap, PropertyBlock.NormalMap2nd); + private readonly lilMaterialProperty bump2ndScale = new lilMaterialProperty("_Bump2ndScale", PropertyBlock.NormalMap, PropertyBlock.NormalMap2nd); + private readonly lilMaterialProperty bump2ndScaleMask = new lilMaterialProperty("_Bump2ndScaleMask", true, PropertyBlock.NormalMap, PropertyBlock.NormalMap2nd); + + private readonly lilMaterialProperty useAnisotropy = new lilMaterialProperty("_UseAnisotropy", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyTangentMap = new lilMaterialProperty("_AnisotropyTangentMap", true, PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyScale = new lilMaterialProperty("_AnisotropyScale", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyScaleMask = new lilMaterialProperty("_AnisotropyScaleMask", true, PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyTangentWidth = new lilMaterialProperty("_AnisotropyTangentWidth", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyBitangentWidth = new lilMaterialProperty("_AnisotropyBitangentWidth", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyShift = new lilMaterialProperty("_AnisotropyShift", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyShiftNoiseScale = new lilMaterialProperty("_AnisotropyShiftNoiseScale", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropySpecularStrength = new lilMaterialProperty("_AnisotropySpecularStrength", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2ndTangentWidth = new lilMaterialProperty("_Anisotropy2ndTangentWidth", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2ndBitangentWidth = new lilMaterialProperty("_Anisotropy2ndBitangentWidth", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2ndShift = new lilMaterialProperty("_Anisotropy2ndShift", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2ndShiftNoiseScale = new lilMaterialProperty("_Anisotropy2ndShiftNoiseScale", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2ndSpecularStrength = new lilMaterialProperty("_Anisotropy2ndSpecularStrength", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropyShiftNoiseMask = new lilMaterialProperty("_AnisotropyShiftNoiseMask", true, PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2Reflection = new lilMaterialProperty("_Anisotropy2Reflection", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2MatCap = new lilMaterialProperty("_Anisotropy2MatCap", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + private readonly lilMaterialProperty anisotropy2MatCap2nd = new lilMaterialProperty("_Anisotropy2MatCap2nd", PropertyBlock.NormalMap, PropertyBlock.Anisotropy); + + private readonly lilMaterialProperty useBacklight = new lilMaterialProperty("_UseBacklight", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightColor = new lilMaterialProperty("_BacklightColor", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightColorTex = new lilMaterialProperty("_BacklightColorTex", true, PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightMainStrength = new lilMaterialProperty("_BacklightMainStrength", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightNormalStrength = new lilMaterialProperty("_BacklightNormalStrength", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightBorder = new lilMaterialProperty("_BacklightBorder", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightBlur = new lilMaterialProperty("_BacklightBlur", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightDirectivity = new lilMaterialProperty("_BacklightDirectivity", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightViewStrength = new lilMaterialProperty("_BacklightViewStrength", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightReceiveShadow = new lilMaterialProperty("_BacklightReceiveShadow", PropertyBlock.Backlight); + private readonly lilMaterialProperty backlightBackfaceMask = new lilMaterialProperty("_BacklightBackfaceMask", PropertyBlock.Backlight); + + private readonly lilMaterialProperty useReflection = new lilMaterialProperty("_UseReflection", PropertyBlock.Reflection); + private readonly lilMaterialProperty metallic = new lilMaterialProperty("_Metallic", PropertyBlock.Reflection, PropertyBlock.Gem); + private readonly lilMaterialProperty metallicGlossMap = new lilMaterialProperty("_MetallicGlossMap", true, PropertyBlock.Reflection, PropertyBlock.Gem); + private readonly lilMaterialProperty smoothness = new lilMaterialProperty("_Smoothness", PropertyBlock.Reflection); + private readonly lilMaterialProperty smoothnessTex = new lilMaterialProperty("_SmoothnessTex", true, PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectance = new lilMaterialProperty("_Reflectance", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionColor = new lilMaterialProperty("_ReflectionColor", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionColorTex = new lilMaterialProperty("_ReflectionColorTex", true, PropertyBlock.Reflection); + private readonly lilMaterialProperty gsaaStrength = new lilMaterialProperty("_GSAAStrength", PropertyBlock.Reflection); + private readonly lilMaterialProperty applySpecular = new lilMaterialProperty("_ApplySpecular", PropertyBlock.Reflection); + private readonly lilMaterialProperty applySpecularFA = new lilMaterialProperty("_ApplySpecularFA", PropertyBlock.Reflection); + private readonly lilMaterialProperty specularNormalStrength = new lilMaterialProperty("_SpecularNormalStrength", PropertyBlock.Reflection); + private readonly lilMaterialProperty specularToon = new lilMaterialProperty("_SpecularToon", PropertyBlock.Reflection); + private readonly lilMaterialProperty specularBorder = new lilMaterialProperty("_SpecularBorder", PropertyBlock.Reflection); + private readonly lilMaterialProperty specularBlur = new lilMaterialProperty("_SpecularBlur", PropertyBlock.Reflection); + private readonly lilMaterialProperty applyReflection = new lilMaterialProperty("_ApplyReflection", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionNormalStrength = new lilMaterialProperty("_ReflectionNormalStrength", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionApplyTransparency = new lilMaterialProperty("_ReflectionApplyTransparency", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionCubeTex = new lilMaterialProperty("_ReflectionCubeTex", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionCubeColor = new lilMaterialProperty("_ReflectionCubeColor", true, PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionCubeOverride = new lilMaterialProperty("_ReflectionCubeOverride", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionCubeEnableLighting = new lilMaterialProperty("_ReflectionCubeEnableLighting", PropertyBlock.Reflection); + private readonly lilMaterialProperty reflectionBlendMode = new lilMaterialProperty("_ReflectionBlendMode", PropertyBlock.Reflection); + + private readonly lilMaterialProperty useMatCap = new lilMaterialProperty("_UseMatCap", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapTex = new lilMaterialProperty("_MatCapTex", true, PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapColor = new lilMaterialProperty("_MatCapColor", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapMainStrength = new lilMaterialProperty("_MatCapMainStrength", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapBlendUV1 = new lilMaterialProperty("_MatCapBlendUV1", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapZRotCancel = new lilMaterialProperty("_MatCapZRotCancel", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapPerspective = new lilMaterialProperty("_MatCapPerspective", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapVRParallaxStrength = new lilMaterialProperty("_MatCapVRParallaxStrength", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapBlend = new lilMaterialProperty("_MatCapBlend", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapBlendMask = new lilMaterialProperty("_MatCapBlendMask", true, PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapEnableLighting = new lilMaterialProperty("_MatCapEnableLighting", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapShadowMask = new lilMaterialProperty("_MatCapShadowMask", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapBackfaceMask = new lilMaterialProperty("_MatCapBackfaceMask", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapLod = new lilMaterialProperty("_MatCapLod", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapBlendMode = new lilMaterialProperty("_MatCapBlendMode", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapApplyTransparency = new lilMaterialProperty("_MatCapApplyTransparency", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapNormalStrength = new lilMaterialProperty("_MatCapNormalStrength", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapCustomNormal = new lilMaterialProperty("_MatCapCustomNormal", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapBumpMap = new lilMaterialProperty("_MatCapBumpMap", true, PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty matcapBumpScale = new lilMaterialProperty("_MatCapBumpScale", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + + private readonly lilMaterialProperty useMatCap2nd = new lilMaterialProperty("_UseMatCap2nd", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndTex = new lilMaterialProperty("_MatCap2ndTex", true, PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndColor = new lilMaterialProperty("_MatCap2ndColor", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndMainStrength = new lilMaterialProperty("_MatCap2ndMainStrength", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndBlendUV1 = new lilMaterialProperty("_MatCap2ndBlendUV1", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndZRotCancel = new lilMaterialProperty("_MatCap2ndZRotCancel", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndPerspective = new lilMaterialProperty("_MatCap2ndPerspective", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndVRParallaxStrength = new lilMaterialProperty("_MatCap2ndVRParallaxStrength", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndBlend = new lilMaterialProperty("_MatCap2ndBlend", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndBlendMask = new lilMaterialProperty("_MatCap2ndBlendMask", true, PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndEnableLighting = new lilMaterialProperty("_MatCap2ndEnableLighting", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndShadowMask = new lilMaterialProperty("_MatCap2ndShadowMask", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndBackfaceMask = new lilMaterialProperty("_MatCap2ndBackfaceMask", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndLod = new lilMaterialProperty("_MatCap2ndLod", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndBlendMode = new lilMaterialProperty("_MatCap2ndBlendMode", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndApplyTransparency = new lilMaterialProperty("_MatCap2ndApplyTransparency", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndNormalStrength = new lilMaterialProperty("_MatCap2ndNormalStrength", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndCustomNormal = new lilMaterialProperty("_MatCap2ndCustomNormal", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndBumpMap = new lilMaterialProperty("_MatCap2ndBumpMap", true, PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + private readonly lilMaterialProperty matcap2ndBumpScale = new lilMaterialProperty("_MatCap2ndBumpScale", PropertyBlock.MatCaps, PropertyBlock.MatCap2nd); + + private readonly lilMaterialProperty useRim = new lilMaterialProperty("_UseRim", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimColor = new lilMaterialProperty("_RimColor", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimColorTex = new lilMaterialProperty("_RimColorTex", true, PropertyBlock.RimLight); + private readonly lilMaterialProperty rimMainStrength = new lilMaterialProperty("_RimMainStrength", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimNormalStrength = new lilMaterialProperty("_RimNormalStrength", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimBorder = new lilMaterialProperty("_RimBorder", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimBlur = new lilMaterialProperty("_RimBlur", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimFresnelPower = new lilMaterialProperty("_RimFresnelPower", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimEnableLighting = new lilMaterialProperty("_RimEnableLighting", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimShadowMask = new lilMaterialProperty("_RimShadowMask", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimBackfaceMask = new lilMaterialProperty("_RimBackfaceMask", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimVRParallaxStrength = new lilMaterialProperty("_RimVRParallaxStrength", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimApplyTransparency = new lilMaterialProperty("_RimApplyTransparency", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimDirStrength = new lilMaterialProperty("_RimDirStrength", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimDirRange = new lilMaterialProperty("_RimDirRange", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimIndirRange = new lilMaterialProperty("_RimIndirRange", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimIndirColor = new lilMaterialProperty("_RimIndirColor", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimIndirBorder = new lilMaterialProperty("_RimIndirBorder", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimIndirBlur = new lilMaterialProperty("_RimIndirBlur", PropertyBlock.RimLight); + private readonly lilMaterialProperty rimBlendMode = new lilMaterialProperty("_RimBlendMode", PropertyBlock.RimLight); + + private readonly lilMaterialProperty useGlitter = new lilMaterialProperty("_UseGlitter", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterUVMode = new lilMaterialProperty("_GlitterUVMode", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterColor = new lilMaterialProperty("_GlitterColor", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterColorTex = new lilMaterialProperty("_GlitterColorTex", true, PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterColorTex_UVMode = new lilMaterialProperty("_GlitterColorTex_UVMode", true, PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterMainStrength = new lilMaterialProperty("_GlitterMainStrength", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterScaleRandomize = new lilMaterialProperty("_GlitterScaleRandomize", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterApplyShape = new lilMaterialProperty("_GlitterApplyShape", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterShapeTex = new lilMaterialProperty("_GlitterShapeTex", true, PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterAtras = new lilMaterialProperty("_GlitterAtras", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterAngleRandomize = new lilMaterialProperty("_GlitterAngleRandomize", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterParams1 = new lilMaterialProperty("_GlitterParams1", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterParams2 = new lilMaterialProperty("_GlitterParams2", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterPostContrast = new lilMaterialProperty("_GlitterPostContrast", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterSensitivity = new lilMaterialProperty("_GlitterSensitivity", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterEnableLighting = new lilMaterialProperty("_GlitterEnableLighting", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterShadowMask = new lilMaterialProperty("_GlitterShadowMask", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterBackfaceMask = new lilMaterialProperty("_GlitterBackfaceMask", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterApplyTransparency = new lilMaterialProperty("_GlitterApplyTransparency", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterVRParallaxStrength = new lilMaterialProperty("_GlitterVRParallaxStrength", PropertyBlock.Glitter); + private readonly lilMaterialProperty glitterNormalStrength = new lilMaterialProperty("_GlitterNormalStrength", PropertyBlock.Glitter); + + private readonly lilMaterialProperty gemChromaticAberration = new lilMaterialProperty("_GemChromaticAberration", PropertyBlock.Gem); + private readonly lilMaterialProperty gemEnvContrast = new lilMaterialProperty("_GemEnvContrast", PropertyBlock.Gem); + private readonly lilMaterialProperty gemEnvColor = new lilMaterialProperty("_GemEnvColor", PropertyBlock.Gem); + private readonly lilMaterialProperty gemParticleLoop = new lilMaterialProperty("_GemParticleLoop", PropertyBlock.Gem); + private readonly lilMaterialProperty gemParticleColor = new lilMaterialProperty("_GemParticleColor", PropertyBlock.Gem); + private readonly lilMaterialProperty gemVRParallaxStrength = new lilMaterialProperty("_GemVRParallaxStrength", PropertyBlock.Gem); + + private readonly lilMaterialProperty outlineColor = new lilMaterialProperty("_OutlineColor", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineTex = new lilMaterialProperty("_OutlineTex", true, PropertyBlock.Outline); + private readonly lilMaterialProperty outlineTex_ScrollRotate = new lilMaterialProperty("_OutlineTex_ScrollRotate", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineTexHSVG = new lilMaterialProperty("_OutlineTexHSVG", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineLitColor = new lilMaterialProperty("_OutlineLitColor", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineLitApplyTex = new lilMaterialProperty("_OutlineLitApplyTex", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineLitScale = new lilMaterialProperty("_OutlineLitScale", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineLitOffset = new lilMaterialProperty("_OutlineLitOffset", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineLitShadowReceive = new lilMaterialProperty("_OutlineLitShadowReceive", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineWidth = new lilMaterialProperty("_OutlineWidth", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineWidthMask = new lilMaterialProperty("_OutlineWidthMask", true, PropertyBlock.Outline); + private readonly lilMaterialProperty outlineFixWidth = new lilMaterialProperty("_OutlineFixWidth", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineVertexR2Width = new lilMaterialProperty("_OutlineVertexR2Width", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineDeleteMesh = new lilMaterialProperty("_OutlineDeleteMesh", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineVectorTex = new lilMaterialProperty("_OutlineVectorTex", true, PropertyBlock.Outline); + private readonly lilMaterialProperty outlineVectorUVMode = new lilMaterialProperty("_OutlineVectorUVMode", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineVectorScale = new lilMaterialProperty("_OutlineVectorScale", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineEnableLighting = new lilMaterialProperty("_OutlineEnableLighting", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineZBias = new lilMaterialProperty("_OutlineZBias", PropertyBlock.Outline); + private readonly lilMaterialProperty outlineDisableInVR = new lilMaterialProperty("_OutlineDisableInVR", PropertyBlock.Outline); + + private readonly lilMaterialProperty useParallax = new lilMaterialProperty("_UseParallax", PropertyBlock.Parallax); + private readonly lilMaterialProperty usePOM = new lilMaterialProperty("_UsePOM", PropertyBlock.Parallax); + private readonly lilMaterialProperty parallaxMap = new lilMaterialProperty("_ParallaxMap", true, PropertyBlock.Parallax); + private readonly lilMaterialProperty parallax = new lilMaterialProperty("_Parallax", PropertyBlock.Parallax); + private readonly lilMaterialProperty parallaxOffset = new lilMaterialProperty("_ParallaxOffset", PropertyBlock.Parallax); + + private readonly lilMaterialProperty distanceFade = new lilMaterialProperty("_DistanceFade", PropertyBlock.DistanceFade); + private readonly lilMaterialProperty distanceFadeColor = new lilMaterialProperty("_DistanceFadeColor", PropertyBlock.DistanceFade); + private readonly lilMaterialProperty distanceFadeMode = new lilMaterialProperty("_DistanceFadeMode", PropertyBlock.DistanceFade); + private readonly lilMaterialProperty distanceFadeRimColor = new lilMaterialProperty("_DistanceFadeRimColor", PropertyBlock.DistanceFade); + private readonly lilMaterialProperty distanceFadeRimFresnelPower = new lilMaterialProperty("_DistanceFadeRimFresnelPower", PropertyBlock.DistanceFade); + + private readonly lilMaterialProperty useAudioLink = new lilMaterialProperty("_UseAudioLink", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkDefaultValue = new lilMaterialProperty("_AudioLinkDefaultValue", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkUVMode = new lilMaterialProperty("_AudioLinkUVMode", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkUVParams = new lilMaterialProperty("_AudioLinkUVParams", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkStart = new lilMaterialProperty("_AudioLinkStart", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkMask = new lilMaterialProperty("_AudioLinkMask", true, PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkMask_ScrollRotate = new lilMaterialProperty("_AudioLinkMask_ScrollRotate", true, PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkMask_UVMode     = new lilMaterialProperty("_AudioLinkMask_UVMode", true, PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLink2Main2nd = new lilMaterialProperty("_AudioLink2Main2nd", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLink2Main3rd = new lilMaterialProperty("_AudioLink2Main3rd", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLink2Emission = new lilMaterialProperty("_AudioLink2Emission", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLink2EmissionGrad = new lilMaterialProperty("_AudioLink2EmissionGrad", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLink2Emission2nd = new lilMaterialProperty("_AudioLink2Emission2nd", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLink2Emission2ndGrad = new lilMaterialProperty("_AudioLink2Emission2ndGrad", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLink2Vertex = new lilMaterialProperty("_AudioLink2Vertex", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkVertexUVMode = new lilMaterialProperty("_AudioLinkVertexUVMode", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkVertexUVParams = new lilMaterialProperty("_AudioLinkVertexUVParams", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkVertexStart = new lilMaterialProperty("_AudioLinkVertexStart", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkVertexStrength = new lilMaterialProperty("_AudioLinkVertexStrength", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkAsLocal = new lilMaterialProperty("_AudioLinkAsLocal", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkLocalMap = new lilMaterialProperty("_AudioLinkLocalMap", PropertyBlock.AudioLink); + private readonly lilMaterialProperty audioLinkLocalMapParams = new lilMaterialProperty("_AudioLinkLocalMapParams", PropertyBlock.AudioLink); + + private readonly lilMaterialProperty dissolveMask = new lilMaterialProperty("_DissolveMask", true, PropertyBlock.Dissolve); + private readonly lilMaterialProperty dissolveNoiseMask = new lilMaterialProperty("_DissolveNoiseMask", true, PropertyBlock.Dissolve); + private readonly lilMaterialProperty dissolveNoiseMask_ScrollRotate = new lilMaterialProperty("_DissolveNoiseMask_ScrollRotate", PropertyBlock.Dissolve); + private readonly lilMaterialProperty dissolveNoiseStrength = new lilMaterialProperty("_DissolveNoiseStrength", PropertyBlock.Dissolve); + private readonly lilMaterialProperty dissolveColor = new lilMaterialProperty("_DissolveColor", PropertyBlock.Dissolve); + private readonly lilMaterialProperty dissolveParams = new lilMaterialProperty("_DissolveParams", PropertyBlock.Dissolve); + private readonly lilMaterialProperty dissolvePos = new lilMaterialProperty("_DissolvePos", PropertyBlock.Dissolve); + + private readonly lilMaterialProperty idMaskCompile = new lilMaterialProperty("_IDMaskCompile", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskFrom = new lilMaterialProperty("_IDMaskFrom", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask1 = new lilMaterialProperty("_IDMask1", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask2 = new lilMaterialProperty("_IDMask2", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask3 = new lilMaterialProperty("_IDMask3", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask4 = new lilMaterialProperty("_IDMask4", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask5 = new lilMaterialProperty("_IDMask5", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask6 = new lilMaterialProperty("_IDMask6", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask7 = new lilMaterialProperty("_IDMask7", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMask8 = new lilMaterialProperty("_IDMask8", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIsBitmap = new lilMaterialProperty("_IDMaskIsBitmap", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex1 = new lilMaterialProperty("_IDMaskIndex1", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex2 = new lilMaterialProperty("_IDMaskIndex2", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex3 = new lilMaterialProperty("_IDMaskIndex3", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex4 = new lilMaterialProperty("_IDMaskIndex4", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex5 = new lilMaterialProperty("_IDMaskIndex5", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex6 = new lilMaterialProperty("_IDMaskIndex6", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex7 = new lilMaterialProperty("_IDMaskIndex7", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskIndex8 = new lilMaterialProperty("_IDMaskIndex8", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskControlsDissolve = new lilMaterialProperty("_IDMaskControlsDissolve", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior1 = new lilMaterialProperty("_IDMaskPrior1", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior2 = new lilMaterialProperty("_IDMaskPrior2", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior3 = new lilMaterialProperty("_IDMaskPrior3", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior4 = new lilMaterialProperty("_IDMaskPrior4", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior5 = new lilMaterialProperty("_IDMaskPrior5", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior6 = new lilMaterialProperty("_IDMaskPrior6", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior7 = new lilMaterialProperty("_IDMaskPrior7", PropertyBlock.IDMask); + private readonly lilMaterialProperty idMaskPrior8 = new lilMaterialProperty("_IDMaskPrior8", PropertyBlock.IDMask); + + private readonly lilMaterialProperty udimDiscardCompile = new lilMaterialProperty("_UDIMDiscardCompile", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardUV = new lilMaterialProperty("_UDIMDiscardUV", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardMethod = new lilMaterialProperty("_UDIMDiscardMode", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow3_0 = new lilMaterialProperty("_UDIMDiscardRow3_0", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow3_1 = new lilMaterialProperty("_UDIMDiscardRow3_1", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow3_2 = new lilMaterialProperty("_UDIMDiscardRow3_2", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow3_3 = new lilMaterialProperty("_UDIMDiscardRow3_3", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow2_0 = new lilMaterialProperty("_UDIMDiscardRow2_0", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow2_1 = new lilMaterialProperty("_UDIMDiscardRow2_1", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow2_2 = new lilMaterialProperty("_UDIMDiscardRow2_2", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow2_3 = new lilMaterialProperty("_UDIMDiscardRow2_3", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow1_0 = new lilMaterialProperty("_UDIMDiscardRow1_0", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow1_1 = new lilMaterialProperty("_UDIMDiscardRow1_1", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow1_2 = new lilMaterialProperty("_UDIMDiscardRow1_2", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow1_3 = new lilMaterialProperty("_UDIMDiscardRow1_3", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow0_0 = new lilMaterialProperty("_UDIMDiscardRow0_0", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow0_1 = new lilMaterialProperty("_UDIMDiscardRow0_1", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow0_2 = new lilMaterialProperty("_UDIMDiscardRow0_2", PropertyBlock.UDIMDiscard); + private readonly lilMaterialProperty udimDiscardRow0_3 = new lilMaterialProperty("_UDIMDiscardRow0_3", PropertyBlock.UDIMDiscard); + + private readonly lilMaterialProperty ignoreEncryption = new lilMaterialProperty("_IgnoreEncryption", PropertyBlock.Encryption); + private readonly lilMaterialProperty keys = new lilMaterialProperty("_Keys", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey0 = new lilMaterialProperty("_BitKey0", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey1 = new lilMaterialProperty("_BitKey1", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey2 = new lilMaterialProperty("_BitKey2", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey3 = new lilMaterialProperty("_BitKey3", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey4 = new lilMaterialProperty("_BitKey4", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey5 = new lilMaterialProperty("_BitKey5", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey6 = new lilMaterialProperty("_BitKey6", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey7 = new lilMaterialProperty("_BitKey7", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey8 = new lilMaterialProperty("_BitKey8", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey9 = new lilMaterialProperty("_BitKey9", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey10 = new lilMaterialProperty("_BitKey10", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey11 = new lilMaterialProperty("_BitKey11", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey12 = new lilMaterialProperty("_BitKey12", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey13 = new lilMaterialProperty("_BitKey13", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey14 = new lilMaterialProperty("_BitKey14", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey15 = new lilMaterialProperty("_BitKey15", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey16 = new lilMaterialProperty("_BitKey16", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey17 = new lilMaterialProperty("_BitKey17", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey18 = new lilMaterialProperty("_BitKey18", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey19 = new lilMaterialProperty("_BitKey19", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey20 = new lilMaterialProperty("_BitKey20", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey21 = new lilMaterialProperty("_BitKey21", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey22 = new lilMaterialProperty("_BitKey22", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey23 = new lilMaterialProperty("_BitKey23", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey24 = new lilMaterialProperty("_BitKey24", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey25 = new lilMaterialProperty("_BitKey25", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey26 = new lilMaterialProperty("_BitKey26", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey27 = new lilMaterialProperty("_BitKey27", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey28 = new lilMaterialProperty("_BitKey28", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey29 = new lilMaterialProperty("_BitKey29", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey30 = new lilMaterialProperty("_BitKey30", PropertyBlock.Encryption); + private readonly lilMaterialProperty bitKey31 = new lilMaterialProperty("_BitKey31", PropertyBlock.Encryption); + + private readonly lilMaterialProperty refractionStrength = new lilMaterialProperty("_RefractionStrength", PropertyBlock.Refraction, PropertyBlock.Gem); + private readonly lilMaterialProperty refractionFresnelPower = new lilMaterialProperty("_RefractionFresnelPower", PropertyBlock.Refraction, PropertyBlock.Gem); + private readonly lilMaterialProperty refractionColorFromMain = new lilMaterialProperty("_RefractionColorFromMain", PropertyBlock.Refraction); + private readonly lilMaterialProperty refractionColor = new lilMaterialProperty("_RefractionColor", PropertyBlock.Refraction); + + private readonly lilMaterialProperty furNoiseMask = new lilMaterialProperty("_FurNoiseMask", true, PropertyBlock.Fur); + private readonly lilMaterialProperty furMask = new lilMaterialProperty("_FurMask", true, PropertyBlock.Fur); + private readonly lilMaterialProperty furLengthMask = new lilMaterialProperty("_FurLengthMask", true, PropertyBlock.Fur); + private readonly lilMaterialProperty furVectorTex = new lilMaterialProperty("_FurVectorTex", true, PropertyBlock.Fur); + private readonly lilMaterialProperty furVectorScale = new lilMaterialProperty("_FurVectorScale", PropertyBlock.Fur); + private readonly lilMaterialProperty furVector = new lilMaterialProperty("_FurVector", PropertyBlock.Fur); + private readonly lilMaterialProperty furGravity = new lilMaterialProperty("_FurGravity", PropertyBlock.Fur); + private readonly lilMaterialProperty furRandomize = new lilMaterialProperty("_FurRandomize", PropertyBlock.Fur); + private readonly lilMaterialProperty furAO = new lilMaterialProperty("_FurAO", PropertyBlock.Fur); + private readonly lilMaterialProperty vertexColor2FurVector = new lilMaterialProperty("_VertexColor2FurVector", PropertyBlock.Fur); + private readonly lilMaterialProperty furMeshType = new lilMaterialProperty("_FurMeshType", PropertyBlock.Fur); + private readonly lilMaterialProperty furLayerNum = new lilMaterialProperty("_FurLayerNum", PropertyBlock.Fur); + private readonly lilMaterialProperty furRootOffset = new lilMaterialProperty("_FurRootOffset", PropertyBlock.Fur); + private readonly lilMaterialProperty furCutoutLength = new lilMaterialProperty("_FurCutoutLength", PropertyBlock.Fur); + private readonly lilMaterialProperty furTouchStrength = new lilMaterialProperty("_FurTouchStrength", PropertyBlock.Fur); + private readonly lilMaterialProperty furRimColor = new lilMaterialProperty("_FurRimColor", PropertyBlock.Fur); + private readonly lilMaterialProperty furRimFresnelPower = new lilMaterialProperty("_FurRimFresnelPower", PropertyBlock.Fur); + private readonly lilMaterialProperty furRimAntiLight = new lilMaterialProperty("_FurRimAntiLight", PropertyBlock.Fur); + + private readonly lilMaterialProperty stencilRef = new lilMaterialProperty("_StencilRef", PropertyBlock.Stencil); + private readonly lilMaterialProperty stencilReadMask = new lilMaterialProperty("_StencilReadMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty stencilWriteMask = new lilMaterialProperty("_StencilWriteMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty stencilComp = new lilMaterialProperty("_StencilComp", PropertyBlock.Stencil); + private readonly lilMaterialProperty stencilPass = new lilMaterialProperty("_StencilPass", PropertyBlock.Stencil); + private readonly lilMaterialProperty stencilFail = new lilMaterialProperty("_StencilFail", PropertyBlock.Stencil); + private readonly lilMaterialProperty stencilZFail = new lilMaterialProperty("_StencilZFail", PropertyBlock.Stencil); + private readonly lilMaterialProperty preStencilRef = new lilMaterialProperty("_PreStencilRef", PropertyBlock.Stencil); + private readonly lilMaterialProperty preStencilReadMask = new lilMaterialProperty("_PreStencilReadMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty preStencilWriteMask = new lilMaterialProperty("_PreStencilWriteMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty preStencilComp = new lilMaterialProperty("_PreStencilComp", PropertyBlock.Stencil); + private readonly lilMaterialProperty preStencilPass = new lilMaterialProperty("_PreStencilPass", PropertyBlock.Stencil); + private readonly lilMaterialProperty preStencilFail = new lilMaterialProperty("_PreStencilFail", PropertyBlock.Stencil); + private readonly lilMaterialProperty preStencilZFail = new lilMaterialProperty("_PreStencilZFail", PropertyBlock.Stencil); + private readonly lilMaterialProperty outlineStencilRef = new lilMaterialProperty("_OutlineStencilRef", PropertyBlock.Stencil); + private readonly lilMaterialProperty outlineStencilReadMask = new lilMaterialProperty("_OutlineStencilReadMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty outlineStencilWriteMask = new lilMaterialProperty("_OutlineStencilWriteMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty outlineStencilComp = new lilMaterialProperty("_OutlineStencilComp", PropertyBlock.Stencil); + private readonly lilMaterialProperty outlineStencilPass = new lilMaterialProperty("_OutlineStencilPass", PropertyBlock.Stencil); + private readonly lilMaterialProperty outlineStencilFail = new lilMaterialProperty("_OutlineStencilFail", PropertyBlock.Stencil); + private readonly lilMaterialProperty outlineStencilZFail = new lilMaterialProperty("_OutlineStencilZFail", PropertyBlock.Stencil); + private readonly lilMaterialProperty furStencilRef = new lilMaterialProperty("_FurStencilRef", PropertyBlock.Stencil); + private readonly lilMaterialProperty furStencilReadMask = new lilMaterialProperty("_FurStencilReadMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty furStencilWriteMask = new lilMaterialProperty("_FurStencilWriteMask", PropertyBlock.Stencil); + private readonly lilMaterialProperty furStencilComp = new lilMaterialProperty("_FurStencilComp", PropertyBlock.Stencil); + private readonly lilMaterialProperty furStencilPass = new lilMaterialProperty("_FurStencilPass", PropertyBlock.Stencil); + private readonly lilMaterialProperty furStencilFail = new lilMaterialProperty("_FurStencilFail", PropertyBlock.Stencil); + private readonly lilMaterialProperty furStencilZFail = new lilMaterialProperty("_FurStencilZFail", PropertyBlock.Stencil); + + private readonly lilMaterialProperty subpassCutoff = new lilMaterialProperty("_SubpassCutoff", PropertyBlock.Rendering); + private readonly lilMaterialProperty cull = new lilMaterialProperty("_Cull", PropertyBlock.Rendering, PropertyBlock.Base); + private readonly lilMaterialProperty srcBlend = new lilMaterialProperty("_SrcBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty dstBlend = new lilMaterialProperty("_DstBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty srcBlendAlpha = new lilMaterialProperty("_SrcBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty dstBlendAlpha = new lilMaterialProperty("_DstBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty blendOp = new lilMaterialProperty("_BlendOp", PropertyBlock.Rendering); + private readonly lilMaterialProperty blendOpAlpha = new lilMaterialProperty("_BlendOpAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty srcBlendFA = new lilMaterialProperty("_SrcBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty dstBlendFA = new lilMaterialProperty("_DstBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty srcBlendAlphaFA = new lilMaterialProperty("_SrcBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty dstBlendAlphaFA = new lilMaterialProperty("_DstBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty blendOpFA = new lilMaterialProperty("_BlendOpFA", PropertyBlock.Rendering, PropertyBlock.Lighting); + private readonly lilMaterialProperty blendOpAlphaFA = new lilMaterialProperty("_BlendOpAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty zclip = new lilMaterialProperty("_ZClip", PropertyBlock.Rendering); + private readonly lilMaterialProperty zwrite = new lilMaterialProperty("_ZWrite", PropertyBlock.Rendering, PropertyBlock.Base); + private readonly lilMaterialProperty ztest = new lilMaterialProperty("_ZTest", PropertyBlock.Rendering); + private readonly lilMaterialProperty offsetFactor = new lilMaterialProperty("_OffsetFactor", PropertyBlock.Rendering); + private readonly lilMaterialProperty offsetUnits = new lilMaterialProperty("_OffsetUnits", PropertyBlock.Rendering); + private readonly lilMaterialProperty colorMask = new lilMaterialProperty("_ColorMask", PropertyBlock.Rendering); + private readonly lilMaterialProperty alphaToMask = new lilMaterialProperty("_AlphaToMask", PropertyBlock.Rendering); + + private readonly lilMaterialProperty preCull = new lilMaterialProperty("_PreCull", PropertyBlock.Rendering); + private readonly lilMaterialProperty preSrcBlend = new lilMaterialProperty("_PreSrcBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty preDstBlend = new lilMaterialProperty("_PreDstBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty preSrcBlendAlpha = new lilMaterialProperty("_PreSrcBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty preDstBlendAlpha = new lilMaterialProperty("_PreDstBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty preBlendOp = new lilMaterialProperty("_PreBlendOp", PropertyBlock.Rendering); + private readonly lilMaterialProperty preBlendOpAlpha = new lilMaterialProperty("_PreBlendOpAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty preSrcBlendFA = new lilMaterialProperty("_PreSrcBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty preDstBlendFA = new lilMaterialProperty("_PreDstBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty preSrcBlendAlphaFA = new lilMaterialProperty("_PreSrcBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty preDstBlendAlphaFA = new lilMaterialProperty("_PreDstBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty preBlendOpFA = new lilMaterialProperty("_PreBlendOpFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty preBlendOpAlphaFA = new lilMaterialProperty("_PreBlendOpAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty preZclip = new lilMaterialProperty("_PreZClip", PropertyBlock.Rendering); + private readonly lilMaterialProperty preZwrite = new lilMaterialProperty("_PreZWrite", PropertyBlock.Rendering); + private readonly lilMaterialProperty preZtest = new lilMaterialProperty("_PreZTest", PropertyBlock.Rendering); + private readonly lilMaterialProperty preOffsetFactor = new lilMaterialProperty("_PreOffsetFactor", PropertyBlock.Rendering); + private readonly lilMaterialProperty preOffsetUnits = new lilMaterialProperty("_PreOffsetUnits", PropertyBlock.Rendering); + private readonly lilMaterialProperty preColorMask = new lilMaterialProperty("_PreColorMask", PropertyBlock.Rendering); + private readonly lilMaterialProperty preAlphaToMask = new lilMaterialProperty("_PreAlphaToMask", PropertyBlock.Rendering); + + private readonly lilMaterialProperty outlineCull = new lilMaterialProperty("_OutlineCull", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineSrcBlend = new lilMaterialProperty("_OutlineSrcBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineDstBlend = new lilMaterialProperty("_OutlineDstBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineSrcBlendAlpha = new lilMaterialProperty("_OutlineSrcBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineDstBlendAlpha = new lilMaterialProperty("_OutlineDstBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineBlendOp = new lilMaterialProperty("_OutlineBlendOp", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineBlendOpAlpha = new lilMaterialProperty("_OutlineBlendOpAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineSrcBlendFA = new lilMaterialProperty("_OutlineSrcBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineDstBlendFA = new lilMaterialProperty("_OutlineDstBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineSrcBlendAlphaFA = new lilMaterialProperty("_OutlineSrcBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineDstBlendAlphaFA = new lilMaterialProperty("_OutlineDstBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineBlendOpFA = new lilMaterialProperty("_OutlineBlendOpFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineBlendOpAlphaFA = new lilMaterialProperty("_OutlineBlendOpAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineZclip = new lilMaterialProperty("_OutlineZClip", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineZwrite = new lilMaterialProperty("_OutlineZWrite", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineZtest = new lilMaterialProperty("_OutlineZTest", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineOffsetFactor = new lilMaterialProperty("_OutlineOffsetFactor", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineOffsetUnits = new lilMaterialProperty("_OutlineOffsetUnits", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineColorMask = new lilMaterialProperty("_OutlineColorMask", PropertyBlock.Rendering); + private readonly lilMaterialProperty outlineAlphaToMask = new lilMaterialProperty("_OutlineAlphaToMask", PropertyBlock.Rendering); + + private readonly lilMaterialProperty furCull = new lilMaterialProperty("_FurCull", PropertyBlock.Rendering); + private readonly lilMaterialProperty furSrcBlend = new lilMaterialProperty("_FurSrcBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty furDstBlend = new lilMaterialProperty("_FurDstBlend", PropertyBlock.Rendering); + private readonly lilMaterialProperty furSrcBlendAlpha = new lilMaterialProperty("_FurSrcBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty furDstBlendAlpha = new lilMaterialProperty("_FurDstBlendAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty furBlendOp = new lilMaterialProperty("_FurBlendOp", PropertyBlock.Rendering); + private readonly lilMaterialProperty furBlendOpAlpha = new lilMaterialProperty("_FurBlendOpAlpha", PropertyBlock.Rendering); + private readonly lilMaterialProperty furSrcBlendFA = new lilMaterialProperty("_FurSrcBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty furDstBlendFA = new lilMaterialProperty("_FurDstBlendFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty furSrcBlendAlphaFA = new lilMaterialProperty("_FurSrcBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty furDstBlendAlphaFA = new lilMaterialProperty("_FurDstBlendAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty furBlendOpFA = new lilMaterialProperty("_FurBlendOpFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty furBlendOpAlphaFA = new lilMaterialProperty("_FurBlendOpAlphaFA", PropertyBlock.Rendering); + private readonly lilMaterialProperty furZclip = new lilMaterialProperty("_FurZClip", PropertyBlock.Rendering); + private readonly lilMaterialProperty furZwrite = new lilMaterialProperty("_FurZWrite", PropertyBlock.Rendering); + private readonly lilMaterialProperty furZtest = new lilMaterialProperty("_FurZTest", PropertyBlock.Rendering); + private readonly lilMaterialProperty furOffsetFactor = new lilMaterialProperty("_FurOffsetFactor", PropertyBlock.Rendering); + private readonly lilMaterialProperty furOffsetUnits = new lilMaterialProperty("_FurOffsetUnits", PropertyBlock.Rendering); + private readonly lilMaterialProperty furColorMask = new lilMaterialProperty("_FurColorMask", PropertyBlock.Rendering); + private readonly lilMaterialProperty furAlphaToMask = new lilMaterialProperty("_FurAlphaToMask", PropertyBlock.Rendering); + + private readonly lilMaterialProperty tessEdge = new lilMaterialProperty("_TessEdge", PropertyBlock.Tessellation); + private readonly lilMaterialProperty tessStrength = new lilMaterialProperty("_TessStrength", PropertyBlock.Tessellation); + private readonly lilMaterialProperty tessShrink = new lilMaterialProperty("_TessShrink", PropertyBlock.Tessellation); + private readonly lilMaterialProperty tessFactorMax = new lilMaterialProperty("_TessFactorMax", PropertyBlock.Tessellation); + + private readonly lilMaterialProperty transparentModeMat = new lilMaterialProperty("_TransparentMode", PropertyBlock.Base); + private readonly lilMaterialProperty useClippingCanceller = new lilMaterialProperty("_UseClippingCanceller", PropertyBlock.Base); + private readonly lilMaterialProperty asOverlay = new lilMaterialProperty("_AsOverlay", PropertyBlock.Base); + private readonly lilMaterialProperty triMask = new lilMaterialProperty("_TriMask", true, PropertyBlock.Base); + private readonly lilMaterialProperty matcapMul = new lilMaterialProperty("_MatCapMul", PropertyBlock.MatCaps, PropertyBlock.MatCap1st); + private readonly lilMaterialProperty fakeShadowVector = new lilMaterialProperty("_FakeShadowVector", PropertyBlock.Base); + + private lilMaterialProperty[] allProperty; + private lilMaterialProperty[] AllProperties() + { + return allProperty ??= new[] + { + invisible, + cutoff, + preColor, + preOutType, + preCutoff, + flipNormal, + backfaceForceShadow, + backfaceColor, + aaStrength, + useDither, + ditherTex, + ditherMaxValue, + + asUnlit, + vertexLightStrength, + lightMinLimit, + lightMaxLimit, + beforeExposureLimit, + monochromeLighting, + alphaBoostFA, + lilDirectionalLightStrength, + lightDirectionOverride, + + baseColor, + baseMap, + baseColorMap, + + shiftBackfaceUV, + mainTex_ScrollRotate, + + mainColor, + mainTex, + mainTexHSVG, + mainGradationStrength, + mainGradationTex, + mainColorAdjustMask, + + useMain2ndTex, + mainColor2nd, + main2ndTex, + main2ndTexAngle, + main2ndTex_ScrollRotate, + main2ndTex_UVMode, + main2ndTex_Cull, + main2ndTexDecalAnimation, + main2ndTexDecalSubParam, + main2ndTexIsDecal, + main2ndTexIsLeftOnly, + main2ndTexIsRightOnly, + main2ndTexShouldCopy, + main2ndTexShouldFlipMirror, + main2ndTexShouldFlipCopy, + main2ndTexIsMSDF, + main2ndBlendMask, + main2ndTexBlendMode, + main2ndTexAlphaMode, + main2ndEnableLighting, + main2ndDissolveMask, + main2ndDissolveNoiseMask, + main2ndDissolveNoiseMask_ScrollRotate, + main2ndDissolveNoiseStrength, + main2ndDissolveColor, + main2ndDissolveParams, + main2ndDissolvePos, + main2ndDistanceFade, + + useMain3rdTex, + mainColor3rd, + main3rdTex, + main3rdTexAngle, + main3rdTex_ScrollRotate, + main3rdTex_UVMode, + main3rdTex_Cull, + main3rdTexDecalAnimation, + main3rdTexDecalSubParam, + main3rdTexIsDecal, + main3rdTexIsLeftOnly, + main3rdTexIsRightOnly, + main3rdTexShouldCopy, + main3rdTexShouldFlipMirror, + main3rdTexShouldFlipCopy, + main3rdTexIsMSDF, + main3rdBlendMask, + main3rdTexBlendMode, + main3rdTexAlphaMode, + main3rdEnableLighting, + main3rdDissolveMask, + main3rdDissolveNoiseMask, + main3rdDissolveNoiseMask_ScrollRotate, + main3rdDissolveNoiseStrength, + main3rdDissolveColor, + main3rdDissolveParams, + main3rdDissolvePos, + main3rdDistanceFade, + + alphaMaskMode, + alphaMask, + alphaMaskScale, + alphaMaskValue, + + useShadow, + shadowStrength, + shadowStrengthMask, + shadowBorderMask, + shadowBlurMask, + shadowStrengthMaskLOD, + shadowBorderMaskLOD, + shadowBlurMaskLOD, + shadowAOShift, + shadowAOShift2, + shadowPostAO, + shadowColorType, + shadowColor, + shadowColorTex, + shadowNormalStrength, + shadowBorder, + shadowBlur, + shadow2ndColor, + shadow2ndColorTex, + shadow2ndNormalStrength, + shadow2ndBorder, + shadow2ndBlur, + shadow3rdColor, + shadow3rdColorTex, + shadow3rdNormalStrength, + shadow3rdBorder, + shadow3rdBlur, + shadowMainStrength, + shadowEnvStrength, + shadowBorderColor, + shadowBorderRange, + shadowReceive, + shadow2ndReceive, + shadow3rdReceive, + shadowMaskType, + shadowFlatBorder, + shadowFlatBlur, + lilShadowCasterBias, + + useRimShade, + rimShadeColor, + rimShadeMask, + rimShadeNormalStrength, + rimShadeBorder, + rimShadeBlur, + rimShadeFresnelPower, + + useEmission, + emissionColor, + emissionMap, + emissionMap_ScrollRotate, + emissionMap_UVMode, + emissionMainStrength, + emissionBlend, + emissionBlendMask, + emissionBlendMask_ScrollRotate, + emissionBlendMode, + emissionBlink, + emissionUseGrad, + emissionGradTex, + emissionGradSpeed, + emissionParallaxDepth, + emissionFluorescence, + + useEmission2nd, + emission2ndColor, + emission2ndMap, + emission2ndMap_ScrollRotate, + emission2ndMap_UVMode, + emission2ndMainStrength, + emission2ndBlend, + emission2ndBlendMask, + emission2ndBlendMask_ScrollRotate, + emission2ndBlendMode, + emission2ndBlink, + emission2ndUseGrad, + emission2ndGradTex, + emission2ndGradSpeed, + emission2ndParallaxDepth, + emission2ndFluorescence, + + useBumpMap, + bumpMap, + bumpScale, + + useBump2ndMap, + bump2ndMap, + bump2ndMap_UVMode, + bump2ndScale, + bump2ndScaleMask, + + useAnisotropy, + anisotropyTangentMap, + anisotropyScale, + anisotropyScaleMask, + anisotropyTangentWidth, + anisotropyBitangentWidth, + anisotropyShift, + anisotropyShiftNoiseScale, + anisotropySpecularStrength, + anisotropy2ndTangentWidth, + anisotropy2ndBitangentWidth, + anisotropy2ndShift, + anisotropy2ndShiftNoiseScale, + anisotropy2ndSpecularStrength, + anisotropyShiftNoiseMask, + anisotropy2Reflection, + anisotropy2MatCap, + anisotropy2MatCap2nd, + + useBacklight, + backlightColor, + backlightColorTex, + backlightMainStrength, + backlightNormalStrength, + backlightBorder, + backlightBlur, + backlightDirectivity, + backlightViewStrength, + backlightReceiveShadow, + backlightBackfaceMask, + + useReflection, + metallic, + metallicGlossMap, + smoothness, + smoothnessTex, + reflectance, + reflectionColor, + reflectionColorTex, + gsaaStrength, + applySpecular, + applySpecularFA, + specularNormalStrength, + specularToon, + specularBorder, + specularBlur, + applyReflection, + reflectionNormalStrength, + reflectionApplyTransparency, + reflectionCubeTex, + reflectionCubeColor, + reflectionCubeOverride, + reflectionCubeEnableLighting, + reflectionBlendMode, + + useMatCap, + matcapTex, + matcapColor, + matcapMainStrength, + matcapBlendUV1, + matcapZRotCancel, + matcapPerspective, + matcapVRParallaxStrength, + matcapBlend, + matcapBlendMask, + matcapEnableLighting, + matcapShadowMask, + matcapBackfaceMask, + matcapLod, + matcapBlendMode, + matcapApplyTransparency, + matcapNormalStrength, + matcapCustomNormal, + matcapBumpMap, + matcapBumpScale, + + useMatCap2nd, + matcap2ndTex, + matcap2ndColor, + matcap2ndMainStrength, + matcap2ndBlendUV1, + matcap2ndZRotCancel, + matcap2ndPerspective, + matcap2ndVRParallaxStrength, + matcap2ndBlend, + matcap2ndBlendMask, + matcap2ndEnableLighting, + matcap2ndShadowMask, + matcap2ndBackfaceMask, + matcap2ndLod, + matcap2ndBlendMode, + matcap2ndApplyTransparency, + matcap2ndNormalStrength, + matcap2ndCustomNormal, + matcap2ndBumpMap, + matcap2ndBumpScale, + + useRim, + rimColor, + rimColorTex, + rimMainStrength, + rimNormalStrength, + rimBorder, + rimBlur, + rimFresnelPower, + rimEnableLighting, + rimShadowMask, + rimBackfaceMask, + rimVRParallaxStrength, + rimApplyTransparency, + rimDirStrength, + rimDirRange, + rimIndirRange, + rimIndirColor, + rimIndirBorder, + rimIndirBlur, + rimBlendMode, + + useGlitter, + glitterUVMode, + glitterColor, + glitterColorTex, + glitterColorTex_UVMode, + glitterMainStrength, + glitterScaleRandomize, + glitterApplyShape, + glitterShapeTex, + glitterAtras, + glitterAngleRandomize, + glitterParams1, + glitterParams2, + glitterPostContrast, + glitterSensitivity, + glitterEnableLighting, + glitterShadowMask, + glitterBackfaceMask, + glitterApplyTransparency, + glitterVRParallaxStrength, + glitterNormalStrength, + + gemChromaticAberration, + gemEnvContrast, + gemEnvColor, + gemParticleLoop, + gemParticleColor, + gemVRParallaxStrength, + + outlineColor, + outlineTex, + outlineTex_ScrollRotate, + outlineTexHSVG, + outlineLitColor, + outlineLitApplyTex, + outlineLitScale, + outlineLitOffset, + outlineLitShadowReceive, + outlineWidth, + outlineWidthMask, + outlineFixWidth, + outlineVertexR2Width, + outlineDeleteMesh, + outlineVectorTex, + outlineVectorUVMode, + outlineVectorScale, + outlineEnableLighting, + outlineZBias, + outlineDisableInVR, + + useParallax, + usePOM, + parallaxMap, + parallax, + parallaxOffset, + + distanceFade, + distanceFadeColor, + distanceFadeMode, + distanceFadeRimColor, + distanceFadeRimFresnelPower, + + useAudioLink, + audioLinkDefaultValue, + audioLinkUVMode, + audioLinkUVParams, + audioLinkStart, + audioLinkMask, + audioLinkMask_ScrollRotate, + audioLinkMask_UVMode, + audioLink2Main2nd, + audioLink2Main3rd, + audioLink2Emission, + audioLink2EmissionGrad, + audioLink2Emission2nd, + audioLink2Emission2ndGrad, + audioLink2Vertex, + audioLinkVertexUVMode, + audioLinkVertexUVParams, + audioLinkVertexStart, + audioLinkVertexStrength, + audioLinkAsLocal, + audioLinkLocalMap, + audioLinkLocalMapParams, + + dissolveMask, + dissolveNoiseMask, + dissolveNoiseMask_ScrollRotate, + dissolveNoiseStrength, + dissolveColor, + dissolveParams, + dissolvePos, + + idMaskCompile, + idMaskFrom, + idMaskIsBitmap, + idMask1, + idMask2, + idMask3, + idMask4, + idMask5, + idMask6, + idMask7, + idMask8, + idMaskIndex1, + idMaskIndex2, + idMaskIndex3, + idMaskIndex4, + idMaskIndex5, + idMaskIndex6, + idMaskIndex7, + idMaskIndex8, + idMaskControlsDissolve, + idMaskPrior1, + idMaskPrior2, + idMaskPrior3, + idMaskPrior4, + idMaskPrior5, + idMaskPrior6, + idMaskPrior7, + idMaskPrior8, + + udimDiscardCompile, + udimDiscardUV, + udimDiscardMethod, + udimDiscardRow3_0, + udimDiscardRow3_1, + udimDiscardRow3_2, + udimDiscardRow3_3, + udimDiscardRow2_0, + udimDiscardRow2_1, + udimDiscardRow2_2, + udimDiscardRow2_3, + udimDiscardRow1_0, + udimDiscardRow1_1, + udimDiscardRow1_2, + udimDiscardRow1_3, + udimDiscardRow0_0, + udimDiscardRow0_1, + udimDiscardRow0_2, + udimDiscardRow0_3, + + ignoreEncryption, + keys, + bitKey0, + bitKey1, + bitKey2, + bitKey3, + bitKey4, + bitKey5, + bitKey6, + bitKey7, + bitKey8, + bitKey9, + bitKey10, + bitKey11, + bitKey12, + bitKey13, + bitKey14, + bitKey15, + bitKey16, + bitKey17, + bitKey18, + bitKey19, + bitKey20, + bitKey21, + bitKey22, + bitKey23, + bitKey24, + bitKey25, + bitKey26, + bitKey27, + bitKey28, + bitKey29, + bitKey30, + bitKey31, + + refractionStrength, + refractionFresnelPower, + refractionColorFromMain, + refractionColor, + + furNoiseMask, + furMask, + furLengthMask, + furVectorTex, + furVectorScale, + furVector, + furGravity, + furRandomize, + furAO, + vertexColor2FurVector, + furMeshType, + furLayerNum, + furRootOffset, + furCutoutLength, + furTouchStrength, + furRimColor, + furRimFresnelPower, + furRimAntiLight, + + stencilRef, + stencilReadMask, + stencilWriteMask, + stencilComp, + stencilPass, + stencilFail, + stencilZFail, + preStencilRef, + preStencilReadMask, + preStencilWriteMask, + preStencilComp, + preStencilPass, + preStencilFail, + preStencilZFail, + outlineStencilRef, + outlineStencilReadMask, + outlineStencilWriteMask, + outlineStencilComp, + outlineStencilPass, + outlineStencilFail, + outlineStencilZFail, + furStencilRef, + furStencilReadMask, + furStencilWriteMask, + furStencilComp, + furStencilPass, + furStencilFail, + furStencilZFail, + + subpassCutoff, + cull, + srcBlend, + dstBlend, + srcBlendAlpha, + dstBlendAlpha, + blendOp, + blendOpAlpha, + srcBlendFA, + dstBlendFA, + srcBlendAlphaFA, + dstBlendAlphaFA, + blendOpFA, + blendOpAlphaFA, + zclip, + zwrite, + ztest, + offsetFactor, + offsetUnits, + colorMask, + alphaToMask, + + preCull, + preSrcBlend, + preDstBlend, + preSrcBlendAlpha, + preDstBlendAlpha, + preBlendOp, + preBlendOpAlpha, + preSrcBlendFA, + preDstBlendFA, + preSrcBlendAlphaFA, + preDstBlendAlphaFA, + preBlendOpFA, + preBlendOpAlphaFA, + preZclip, + preZwrite, + preZtest, + preOffsetFactor, + preOffsetUnits, + preColorMask, + preAlphaToMask, + + outlineCull, + outlineSrcBlend, + outlineDstBlend, + outlineSrcBlendAlpha, + outlineDstBlendAlpha, + outlineBlendOp, + outlineBlendOpAlpha, + outlineSrcBlendFA, + outlineDstBlendFA, + outlineSrcBlendAlphaFA, + outlineDstBlendAlphaFA, + outlineBlendOpFA, + outlineBlendOpAlphaFA, + outlineZclip, + outlineZwrite, + outlineZtest, + outlineOffsetFactor, + outlineOffsetUnits, + outlineColorMask, + outlineAlphaToMask, + + furCull, + furSrcBlend, + furDstBlend, + furSrcBlendAlpha, + furDstBlendAlpha, + furBlendOp, + furBlendOpAlpha, + furSrcBlendFA, + furDstBlendFA, + furSrcBlendAlphaFA, + furDstBlendAlphaFA, + furBlendOpFA, + furBlendOpAlphaFA, + furZclip, + furZwrite, + furZtest, + furOffsetFactor, + furOffsetUnits, + furColorMask, + furAlphaToMask, + + tessEdge, + tessStrength, + tessShrink, + tessFactorMax, + + transparentModeMat, + useClippingCanceller, + asOverlay, + triMask, + matcapMul, + fakeShadowVector, + }; + } + + private void SetProperties(MaterialProperty[] propsSource) + { + var allProps = AllProperties(); +#if UNITY_2022_3_OR_NEWER + var dictonary = UnityEngine.Pool.DictionaryPool.Get(); +#else + var dictonary = new Dictionary(); +#endif + for (var i = 0; propsSource.Length > i; i += 1) + { + var p = propsSource[i]; + if (p == null) { continue; } + dictonary[p.name] = p; + } + + for (var i = 0; allProps.Length > i; i += 1) + { + var lilPorp = allProps[i]; + if (dictonary.TryGetValue(lilPorp.propertyName, out var materialProperty)) + lilPorp.p = materialProperty; + } + +#if UNITY_2022_3_OR_NEWER + UnityEngine.Pool.DictionaryPool.Release(dictonary); +#endif + } + + private Dictionary> block2Propertes; + private Dictionary> GetBlock2Properties() + { + if (block2Propertes is null) + { + block2Propertes = new Dictionary>(); + var allProps = AllProperties(); + + for (var i = 0; allProps.Length > i; i += 1) + { + var lilPorp = allProps[i]; + foreach(var block in lilPorp.blocks) + { + if(block2Propertes.ContainsKey(block) is false) { block2Propertes[block] = new(); } + block2Propertes[block].Add(lilPorp); + } + } + } + return block2Propertes; + } + + + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs.meta new file mode 100644 index 00000000..b151e344 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilMaterialProperties.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10b6579e1dde093418f76dc08d71177a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs b/Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs new file mode 100644 index 00000000..32ac24bf --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs @@ -0,0 +1,190 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + //------------------------------------------------------------------------------------------------------------------------------ + // Property drawer + #region + private void LocalizedProperty(MaterialProperty prop, bool shouldCheck = true) + { + lilEditorGUI.LocalizedProperty(m_MaterialEditor, prop, shouldCheck); + } + + private void LocalizedProperty(lilMaterialProperty prop, bool shouldCheck = true) + { + if (prop.p != null) LocalizedProperty(prop.p, shouldCheck); + } + + private void LocalizedProperty(MaterialProperty prop, string label, bool shouldCheck = true) + { + lilEditorGUI.LocalizedProperty(m_MaterialEditor, prop, label, shouldCheck); + } + + private void LocalizedProperty(MaterialProperty prop, int indent, bool shouldCheck = true) + { + lilEditorGUI.LocalizedProperty(m_MaterialEditor, prop, indent, shouldCheck); + } + + private void LocalizedPropertyColorWithAlpha(MaterialProperty prop, bool shouldCheck = true) + { + lilEditorGUI.LocalizedPropertyColorWithAlpha(m_MaterialEditor, prop, shouldCheck); + } + + public static void LocalizedPropertyTexture(GUIContent content, MaterialProperty tex, bool shouldCheck = true) + { + lilEditorGUI.LocalizedPropertyTexture(m_MaterialEditor, content, tex, shouldCheck); + } + + public static void LocalizedPropertyTexture(GUIContent content, MaterialProperty tex, MaterialProperty color, bool shouldCheck = true) + { + lilEditorGUI.LocalizedPropertyTexture(m_MaterialEditor, content, tex, color, shouldCheck); + } + + private void LocalizedPropertyTextureWithAlpha(GUIContent content, MaterialProperty tex, MaterialProperty color, bool shouldCheck = true) + { + lilEditorGUI.LocalizedPropertyTextureWithAlpha(m_MaterialEditor, content, tex, color, shouldCheck); + } + + private void LocalizedPropertyAlpha(MaterialProperty prop, bool shouldCheck = true) + { + lilEditorGUI.LocalizedPropertyAlpha(prop, shouldCheck); + } + + private void UV4Decal(MaterialProperty isDecal, MaterialProperty isLeftOnly, MaterialProperty isRightOnly, MaterialProperty shouldCopy, MaterialProperty shouldFlipMirror, MaterialProperty shouldFlipCopy, MaterialProperty tex, MaterialProperty SR, MaterialProperty angle, MaterialProperty decalAnimation, MaterialProperty decalSubParam, MaterialProperty uvMode) + { + lilEditorGUI.UV4Decal(m_MaterialEditor, isDecal, isLeftOnly, isRightOnly, shouldCopy, shouldFlipMirror, shouldFlipCopy, tex, SR, angle, decalAnimation, decalSubParam, uvMode); + } + + private void ToneCorrectionGUI(MaterialProperty hsvg) + { + lilEditorGUI.ToneCorrectionGUI(m_MaterialEditor, hsvg); + } + + private void ToneCorrectionGUI(MaterialProperty hsvg, int indent) + { + lilEditorGUI.ToneCorrectionGUI(m_MaterialEditor, hsvg, indent); + } + + private void UVSettingGUI(MaterialProperty uvst) + { + lilEditorGUI.UVSettingGUI(m_MaterialEditor, uvst); + } + + private void UVSettingGUI(MaterialProperty uvst, MaterialProperty uvsr) + { + lilEditorGUI.UVSettingGUI(m_MaterialEditor, uvst, uvsr); + } + + private void BlendSettingGUI(ref bool isShow, string labelName, MaterialProperty srcRGB, MaterialProperty dstRGB, MaterialProperty srcA, MaterialProperty dstA, MaterialProperty opRGB, MaterialProperty opA) + { + lilEditorGUI.BlendSettingGUI(m_MaterialEditor, isCustomEditor, ref isShow, labelName, srcRGB, dstRGB, srcA, dstA, opRGB, opA); + } + + private void TextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName) + { + lilEditorGUI.TextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName); + } + + private void TextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba) + { + lilEditorGUI.TextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName, rgba); + } + + private void TextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty uvMode, string sUVMode) + { + lilEditorGUI.TextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName, rgba, uvMode, sUVMode); + } + + private void TextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty scrollRotate) + { + lilEditorGUI.TextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName, rgba, scrollRotate); + } + + private void TextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty scrollRotate, bool useCustomUV, bool useUVAnimation) + { + lilEditorGUI.TextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName, rgba, scrollRotate, useCustomUV, useUVAnimation); + } + + private void TextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty scrollRotate, MaterialProperty uvMode, bool useCustomUV, bool useUVAnimation) + { + lilEditorGUI.TextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName, rgba, scrollRotate, uvMode, useCustomUV, useUVAnimation); + } + + private void MatCapTextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) + { + lilEditorGUI.MatCapTextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName, blendUV1, zRotCancel, perspective, vrParallaxStrength); + } + + private void MatCapTextureGUI(ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) + { + lilEditorGUI.MatCapTextureGUI(m_MaterialEditor, isCustomEditor, ref isShow, guiContent, textureName, rgba, blendUV1, zRotCancel, perspective, vrParallaxStrength); + } + + private void RenderQueueField() + { + lilEditorGUI.RenderQueueField(m_MaterialEditor); + } + + private void EnableInstancingField() + { + lilEditorGUI.EnableInstancingField(m_MaterialEditor); + } + + private void DoubleSidedGIField() + { + lilEditorGUI.DoubleSidedGIField(m_MaterialEditor); + } + + private void LightmapEmissionFlagsProperty() + { + lilEditorGUI.LightmapEmissionFlagsProperty(m_MaterialEditor); + } + + private void TextureBakeGUI(Material material, int bakeType) + { + // bakeType + // 0 : All + // 1 : 1st + // 2 : 2nd + // 3 : 3rd + // 4 : 1st Simple Button + // 5 : 2nd Simple Button + // 6 : 3rd Simple Button + string[] sBake = {GetLoc("sBakeAll"), GetLoc("sBake1st"), GetLoc("sBake2nd"), GetLoc("sBake3rd"), GetLoc("sBake"), GetLoc("sBake"), GetLoc("sBake")}; + if(lilEditorGUI.Button(sBake[bakeType])) + { + Undo.RecordObject(material, "Bake"); + TextureBake(material, bakeType); + } + } + + private void AlphamaskToTextureGUI(Material material) + { + if(mainTex.textureValue != null && lilEditorGUI.Button(GetLoc("sBakeAlphamask"))) + { + var bakedTexture = AutoBakeAlphaMask(material); + if(bakedTexture == mainTex.textureValue) return; + + mainTex.textureValue = bakedTexture; + alphaMaskMode.floatValue = 0.0f; + alphaMask.textureValue = null; + alphaMaskValue.floatValue = 0.0f; + } + } + #endregion + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs.meta new file mode 100644 index 00000000..aee52a06 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyDrawers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b7b3577238684c43955045aaa5411b6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs new file mode 100644 index 00000000..5f75a79d --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs @@ -0,0 +1,368 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + private void DrawOutlineSettings(Material material) + { + if(!ShouldDrawBlock(PropertyBlock.Outline)) return; + if(isMultiVariants || isRefr || isFur || isGem || isFakeShadow || material.shader.name.Contains("Overlay")) return; + edSet.isShowOutline = lilEditorGUI.Foldout(GetLoc("sOutlineSetting"), edSet.isShowOutline); + DrawMenuButton(GetLoc("sAnchorOutline"), PropertyBlock.Outline); + if(edSet.isShowOutline) + { + EditorGUILayout.BeginVertical(boxOuter); + if(isShowRenderMode) + { + if(isOutl != EditorGUILayout.ToggleLeft(GetLoc("sOutline"), isOutl, customToggleFont)) + { + isOutl = !isOutl; + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + } + } + else if(isCustomShader) + { + EditorGUILayout.LabelField(GetLoc("sOutline"), customToggleFont); + } + if(!isLite && isOutl) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowOutlineMap, mainColorRGBAContent, outlineTex, outlineColor, outlineTex_ScrollRotate, true, true); + EditorGUI.indentLevel++; + ToneCorrectionGUI(outlineTexHSVG); + if(lilEditorGUI.Button(GetLoc("sBake"))) + { + outlineTex.textureValue = AutoBakeOutlineTexture(material); + outlineTexHSVG.vectorValue = lilConstants.defaultHSVG; + } + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + GUILayout.Label(GetLoc("sHighlight"), boldLabel); + EditorGUI.indentLevel++; + LocalizedPropertyColorWithAlpha(outlineLitColor); + if(outlineLitColor.colorValue.a > 0) + { + LocalizedProperty(outlineLitApplyTex); + float min = lilEditorGUI.GetRemapMinValue(outlineLitScale.floatValue, outlineLitOffset.floatValue); + float max = lilEditorGUI.GetRemapMaxValue(outlineLitScale.floatValue, outlineLitOffset.floatValue); + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = alphaMaskScale.hasMixedValue || alphaMaskValue.hasMixedValue; + min = lilEditorGUI.Slider(Event.current.alt ? outlineLitScale.name + ", " + outlineLitOffset.name : "Min", min, -0.01f, 1.01f); + max = lilEditorGUI.Slider(Event.current.alt ? outlineLitScale.name + ", " + outlineLitOffset.name : "Max", max, -0.01f, 1.01f); + EditorGUI.showMixedValue = false; + if(EditorGUI.EndChangeCheck()) + { + if(min == max) max += 0.001f; + outlineLitScale.floatValue = lilEditorGUI.GetRemapScaleValue(min, max); + outlineLitOffset.floatValue = lilEditorGUI.GetRemapOffsetValue(min, max); + } + LocalizedProperty(outlineLitShadowReceive); + } + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + LocalizedProperty(outlineEnableLighting); + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(widthMaskContent, outlineWidthMask, outlineWidth); + EditorGUI.indentLevel++; + LocalizedProperty(outlineFixWidth); + LocalizedProperty(outlineVertexR2Width); + LocalizedProperty(outlineDeleteMesh); + LocalizedProperty(outlineZBias); + LocalizedProperty(outlineDisableInVR); + EditorGUI.indentLevel--; + LocalizedPropertyTexture(normalMapContent, outlineVectorTex, outlineVectorScale); + LocalizedProperty(outlineVectorUVMode, 2); + EditorGUILayout.EndVertical(); + } + else if(isOutl) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowOutlineMap, mainColorRGBAContent, outlineTex, outlineColor, outlineTex_ScrollRotate, true, true); + LocalizedProperty(outlineEnableLighting); + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(widthMaskContent, outlineWidthMask, outlineWidth); + EditorGUI.indentLevel++; + LocalizedProperty(outlineFixWidth); + LocalizedProperty(outlineVertexR2Width); + LocalizedProperty(outlineDeleteMesh); + LocalizedProperty(outlineZBias); + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + private void DrawOutlineSettingsSimple(Material material) + { + if(!ShouldDrawBlock(PropertyBlock.Outline)) return; + if(isMultiVariants || isRefr || isFur || isGem || isFakeShadow || material.shader.name.Contains("Overlay")) return; + edSet.isShowOutline = lilEditorGUI.Foldout(GetLoc("sOutlineSetting"), edSet.isShowOutline); + DrawMenuButton(GetLoc("sAnchorOutline"), PropertyBlock.Outline); + if(edSet.isShowOutline) + { + EditorGUILayout.BeginVertical(boxOuter); + if(isShowRenderMode) + { + if(isOutl != EditorGUILayout.ToggleLeft(GetLoc("sOutline"), isOutl, customToggleFont)) + { + isOutl = !isOutl; + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + } + } + else if(isCustomShader) + { + EditorGUILayout.LabelField(GetLoc("sOutline"), customToggleFont); + } + if(!isLite && isOutl) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowOutlineMap, mainColorRGBAContent, outlineTex, outlineColor, outlineTex_ScrollRotate, true, true); + LocalizedPropertyTexture(widthMaskContent, outlineWidthMask, outlineWidth); + EditorGUILayout.EndVertical(); + } + else if(isOutl) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowOutlineMap, mainColorRGBAContent, outlineTex, outlineColor, outlineTex_ScrollRotate, true, true); + LocalizedPropertyTexture(widthMaskContent, outlineWidthMask, outlineWidth); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + private void DrawSpecularMode() + { + int specularMode = 0; + if(specularToon.floatValue == 0.0f) specularMode = 1; + if(specularToon.floatValue == 1.0f) specularMode = 2; + if(applySpecular.floatValue == 0.0f) specularMode = 0; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = specularToon.hasMixedValue || applySpecular.hasMixedValue; + specularMode = lilEditorGUI.Popup(GetLoc("sSpecularMode"),specularMode,new string[]{GetLoc("sSpecularNone"),GetLoc("sSpecularReal"),GetLoc("sSpecularToon")}); + EditorGUI.showMixedValue = false; + if(EditorGUI.EndChangeCheck()) + { + if(specularMode == 0) + { + applySpecular.floatValue = 0.0f; + specularToon.floatValue = 0.0f; + } + if(specularMode == 1) + { + applySpecular.floatValue = 1.0f; + specularToon.floatValue = 0.0f; + EditorGUI.indentLevel++; + LocalizedProperty(specularNormalStrength); + LocalizedProperty(applySpecularFA); + EditorGUI.indentLevel--; + } + if(specularMode == 2) + { + applySpecular.floatValue = 1.0f; + specularToon.floatValue = 1.0f; + EditorGUI.indentLevel++; + LocalizedProperty(specularNormalStrength); + LocalizedProperty(specularBorder); + LocalizedProperty(specularBlur); + LocalizedProperty(applySpecularFA); + EditorGUI.indentLevel--; + } + } + + if(specularMode == 1) + { + EditorGUI.indentLevel++; + LocalizedProperty(specularNormalStrength); + LocalizedProperty(applySpecularFA); + EditorGUI.indentLevel--; + } + if(specularMode == 2) + { + EditorGUI.indentLevel++; + LocalizedProperty(specularNormalStrength); + LocalizedProperty(specularBorder); + LocalizedProperty(specularBlur); + LocalizedProperty(applySpecularFA); + EditorGUI.indentLevel--; + } + } + + private void DrawStencilSettings(Material material) + { + if(!ShouldDrawBlock(PropertyBlock.Stencil)) return; + edSet.isShowStencil = lilEditorGUI.Foldout(GetLoc("sStencilSetting"), edSet.isShowStencil); + DrawMenuButton(GetLoc("sAnchorStencil"), PropertyBlock.Stencil); + if(edSet.isShowStencil) + { + if(lilEditorGUI.Button("Reset")) + { + isStWr = false; + stencilRef.floatValue = 0; + stencilReadMask.floatValue = 255.0f; + stencilWriteMask.floatValue = 255.0f; + stencilComp.floatValue = (float)CompareFunction.Always; + stencilPass.floatValue = (float)StencilOp.Keep; + stencilFail.floatValue = (float)StencilOp.Keep; + stencilZFail.floatValue = (float)StencilOp.Keep; + if(transparentModeBuf == TransparentMode.TwoPass) + { + preStencilRef.floatValue = 0; + preStencilReadMask.floatValue = 255.0f; + preStencilWriteMask.floatValue = 255.0f; + preStencilComp.floatValue = (float)CompareFunction.Always; + preStencilPass.floatValue = (float)StencilOp.Keep; + preStencilFail.floatValue = (float)StencilOp.Keep; + preStencilZFail.floatValue = (float)StencilOp.Keep; + } + if(isOutl) + { + outlineStencilRef.floatValue = 0; + outlineStencilReadMask.floatValue = 255.0f; + outlineStencilWriteMask.floatValue = 255.0f; + outlineStencilComp.floatValue = (float)CompareFunction.Always; + outlineStencilPass.floatValue = (float)StencilOp.Keep; + outlineStencilFail.floatValue = (float)StencilOp.Keep; + outlineStencilZFail.floatValue = (float)StencilOp.Keep; + } + if(isFur) + { + furStencilRef.floatValue = 0; + furStencilReadMask.floatValue = 255.0f; + furStencilWriteMask.floatValue = 255.0f; + furStencilComp.floatValue = (float)CompareFunction.Always; + furStencilPass.floatValue = (float)StencilOp.Keep; + furStencilFail.floatValue = (float)StencilOp.Keep; + furStencilZFail.floatValue = (float)StencilOp.Keep; + } + } + + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(stencilRef); + LocalizedProperty(stencilReadMask); + LocalizedProperty(stencilWriteMask); + LocalizedProperty(stencilComp); + LocalizedProperty(stencilPass); + LocalizedProperty(stencilFail); + LocalizedProperty(stencilZFail); + EditorGUILayout.EndVertical(); + + if(transparentModeBuf == TransparentMode.TwoPass) + { + EditorGUILayout.LabelField("PrePass"); + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(preStencilRef); + LocalizedProperty(preStencilReadMask); + LocalizedProperty(preStencilWriteMask); + LocalizedProperty(preStencilComp); + LocalizedProperty(preStencilPass); + LocalizedProperty(preStencilFail); + LocalizedProperty(preStencilZFail); + EditorGUILayout.EndVertical(); + } + + if(isOutl) + { + EditorGUILayout.LabelField(GetLoc("sOutline")); + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(outlineStencilRef); + LocalizedProperty(outlineStencilReadMask); + LocalizedProperty(outlineStencilWriteMask); + LocalizedProperty(outlineStencilComp); + LocalizedProperty(outlineStencilPass); + LocalizedProperty(outlineStencilFail); + LocalizedProperty(outlineStencilZFail); + EditorGUILayout.EndVertical(); + } + + if(isFur) + { + EditorGUILayout.LabelField(GetLoc("sFur")); + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(furStencilRef); + LocalizedProperty(furStencilReadMask); + LocalizedProperty(furStencilWriteMask); + LocalizedProperty(furStencilComp); + LocalizedProperty(furStencilPass); + LocalizedProperty(furStencilFail); + LocalizedProperty(furStencilZFail); + EditorGUILayout.EndVertical(); + } + } + } + + private void DrawEncryptionSettings() + { + if(lilDirectoryManager.ExistsEncryption() || lilDirectoryManager.ExistsAvaCryptV2()) + { + if(!ShouldDrawBlock(PropertyBlock.Encryption)) return; + edSet.isShowEncryption = lilEditorGUI.Foldout(GetLoc("sEncryption"), edSet.isShowEncryption); + DrawMenuButton(GetLoc("sAnchorEncryption"), PropertyBlock.Encryption); + if(edSet.isShowEncryption) + { + EditorGUILayout.BeginVertical(boxOuter); + EditorGUILayout.LabelField(GetLoc("sEncryption"), customToggleFont); + DrawMenuButton(GetLoc("sAnchorEncryption"), PropertyBlock.Encryption); + EditorGUILayout.BeginVertical(boxInnerHalf); + EditorGUILayout.HelpBox("This will be removed in the future.", MessageType.Warning); + LocalizedProperty(ignoreEncryption); + if(lilDirectoryManager.ExistsEncryption()) + { + LocalizedProperty(keys); + } + else + { + LocalizedProperty(bitKey0); + LocalizedProperty(bitKey1); + LocalizedProperty(bitKey2); + LocalizedProperty(bitKey3); + LocalizedProperty(bitKey4); + LocalizedProperty(bitKey5); + LocalizedProperty(bitKey6); + LocalizedProperty(bitKey7); + LocalizedProperty(bitKey8); + LocalizedProperty(bitKey9); + LocalizedProperty(bitKey10); + LocalizedProperty(bitKey11); + LocalizedProperty(bitKey12); + LocalizedProperty(bitKey13); + LocalizedProperty(bitKey14); + LocalizedProperty(bitKey15); + LocalizedProperty(bitKey16); + LocalizedProperty(bitKey17); + LocalizedProperty(bitKey18); + LocalizedProperty(bitKey19); + LocalizedProperty(bitKey20); + LocalizedProperty(bitKey21); + LocalizedProperty(bitKey22); + LocalizedProperty(bitKey23); + LocalizedProperty(bitKey24); + LocalizedProperty(bitKey25); + LocalizedProperty(bitKey26); + LocalizedProperty(bitKey27); + LocalizedProperty(bitKey28); + LocalizedProperty(bitKey29); + LocalizedProperty(bitKey30); + LocalizedProperty(bitKey31); + } + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + } + } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs.meta new file mode 100644 index 00000000..0eb1bb49 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerAdvancedSetting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 593136c44a7ecda4ab7dfe4d2abfa3d3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs new file mode 100644 index 00000000..27a245ce --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs @@ -0,0 +1,514 @@ +#if !LILTOON_VRCSDK3_AVATARS && !LILTOON_VRCSDK3_WORLDS && VRC_SDK_VRCSDK3 + #if UDON + #define LILTOON_VRCSDK3_WORLDS + #else + #define LILTOON_VRCSDK3_AVATARS + #endif +#endif +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + + private void DrawRenderingModeSettings(Material material, string sTransparentMode, string[] sRenderingModeList, string[] sRenderingModeListLite) + { + if(isMultiVariants) + { + GUI.enabled = false; + EditorGUI.showMixedValue = true; + lilEditorGUI.Popup(GetLoc("sRenderingMode"), (int)renderingModeBuf, sRenderingModeList); + EditorGUI.showMixedValue = false; + GUI.enabled = true; + } + else + { + if(isShowRenderMode && !isMulti) + { + RenderingMode renderingMode; + if(isLite) renderingMode = (RenderingMode)lilEditorGUI.Popup(GetLoc("sRenderingMode"), (int)renderingModeBuf, sRenderingModeListLite); + else renderingMode = (RenderingMode)lilEditorGUI.Popup(GetLoc("sRenderingMode"), (int)renderingModeBuf, sRenderingModeList); + if(renderingModeBuf != renderingMode) + { + SetupMaterialWithRenderingMode(renderingMode, transparentModeBuf); + if(renderingMode == RenderingMode.Cutout || renderingMode == RenderingMode.FurCutout) cutoff.floatValue = 0.5f; + if(renderingMode == RenderingMode.Transparent || renderingMode == RenderingMode.Fur || renderingMode == RenderingMode.FurTwoPass) cutoff.floatValue = 0.001f; + if(transparentModeBuf == TransparentMode.TwoPass) + { + preCutoff.floatValue = 0.001f; + cull.floatValue = 2.0f; + preCull.floatValue = 1.0f; + } + } + } + else if(isShowRenderMode && isMulti) + { + float transparentModeMatBuf = transparentModeMat.floatValue; + m_MaterialEditor.ShaderProperty(transparentModeMat, sTransparentMode); + if(transparentModeMatBuf != transparentModeMat.floatValue) + { + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + if(transparentModeMat.floatValue == 1.0f || transparentModeMat.floatValue == 5.0f) cutoff.floatValue = 0.5f; + if(transparentModeMat.floatValue == 2.0f || transparentModeMat.floatValue == 4.0f) cutoff.floatValue = 0.001f; + } + } + if(renderingModeBuf == RenderingMode.Transparent) + { + var transparentMode = (TransparentMode)lilEditorGUI.Popup(GetLoc("sTransparentMode"), (int)transparentModeBuf, sTransparentModeList); + if(transparentModeBuf != transparentMode) + { + SetupMaterialWithRenderingMode(renderingModeBuf, transparentMode); + } + if(transparentModeBuf == TransparentMode.OnePass && vertexLightStrength.floatValue != 1.0f && lilRenderPipelineReader.GetRP() == lilRenderPipeline.BRP && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpOnePassVertexLight"))) + { + vertexLightStrength.floatValue = 1.0f; + } + } + if(renderingModeBuf == RenderingMode.Fur || renderingModeBuf == RenderingMode.FurCutout || renderingModeBuf == RenderingMode.FurTwoPass) + { + EditorGUILayout.HelpBox(GetLoc("sHelpRenderingFur"), MessageType.Warning); + } + if(lilDirectoryManager.ExistsClusterCreatorKit()) + { + if(renderingModeBuf == RenderingMode.Refraction || renderingModeBuf == RenderingMode.RefractionBlur || renderingModeBuf == RenderingMode.Gem) + { + EditorGUILayout.HelpBox(GetLoc("sHelpGrabPass"), MessageType.Warning); + } + if(renderingModeBuf == RenderingMode.Fur || renderingModeBuf == RenderingMode.FurCutout || renderingModeBuf == RenderingMode.FurTwoPass) + { + EditorGUILayout.HelpBox(GetLoc("sHelpGeometryShader"), MessageType.Warning); + } + } + } + } + + private void DrawBaseSettings(Material material, string sTransparentMode, string[] sRenderingModeList, string[] sRenderingModeListLite, string[] sTransparentModeList) + { + DrawRenderingModeSettings(material, sTransparentMode, sRenderingModeList, sRenderingModeListLite); + + if(!ShouldDrawBlock(PropertyBlock.Base)) return; + + EditorGUILayout.Space(); + GUILayout.Label(GetLoc("sBaseSetting"), boldLabel); + + edSet.isShowBase = lilEditorGUI.Foldout(GetLoc("sBaseSetting"), edSet.isShowBase); + DrawMenuButton(GetLoc("sAnchorBaseSetting"), PropertyBlock.Base); + if(edSet.isShowBase) + { + EditorGUILayout.BeginVertical(customBox); + if(isMulti) + { + LocalizedProperty(asOverlay); + } + if(isUseAlpha) + { + LocalizedProperty(cutoff); + } + if(!isGem && !isFakeShadow) + { + LocalizedProperty(cull); + EditorGUI.indentLevel++; + if(cull.floatValue == 1.0f && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpCullMode"))) + { + cull.floatValue = 2.0f; + } + if(cull.floatValue <= 1.0f || transparentModeBuf == TransparentMode.TwoPass && preCull.floatValue <= 1.0f) + { + LocalizedProperty(flipNormal); + LocalizedProperty(backfaceForceShadow); + if(!isLite) + { + LocalizedPropertyColorWithAlpha(backfaceColor); + } + } + EditorGUI.indentLevel--; + } + LocalizedProperty(invisible); + LocalizedProperty(zwrite); + if(zwrite.floatValue != 1.0f && !isGem && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpZWrite"))) + { + zwrite.floatValue = 1.0f; + } + if(isMulti) LocalizedProperty(useClippingCanceller); + if(!isFakeShadow) LocalizedProperty(aaStrength); + if(!isFakeShadow && renderingModeBuf == RenderingMode.Cutout || (isMulti && transparentModeMat.floatValue == 1.0f)) + { + LocalizedProperty(useDither); + if(lilEditorGUI.CheckPropertyToDraw(ditherTex, ditherMaxValue) && useDither.floatValue == 1.0f) + { + EditorGUI.indentLevel++; + EditorGUI.BeginChangeCheck(); + LocalizedPropertyTexture(ditherContent, ditherTex); + if(EditorGUI.EndChangeCheck() && ditherTex.textureValue != null) + { + ditherMaxValue.floatValue = Mathf.Clamp(ditherTex.textureValue.width * ditherTex.textureValue.height-1, 0, 255); + } + LocalizedProperty(ditherMaxValue); + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(16); + if(GUILayout.Button("x2" )){ditherTex.textureValue = AssetDatabase.LoadAssetAtPath(lilDirectoryManager.GetMainFolderPath() + "/Texture/lil_bayer_2x2.png"); ditherMaxValue.floatValue = 3 ;} + if(GUILayout.Button("x4" )){ditherTex.textureValue = AssetDatabase.LoadAssetAtPath(lilDirectoryManager.GetMainFolderPath() + "/Texture/lil_bayer_4x4.png"); ditherMaxValue.floatValue = 15 ;} + if(GUILayout.Button("x8" )){ditherTex.textureValue = AssetDatabase.LoadAssetAtPath(lilDirectoryManager.GetMainFolderPath() + "/Texture/lil_bayer_8x8.png"); ditherMaxValue.floatValue = 63 ;} + if(GUILayout.Button("x16")){ditherTex.textureValue = AssetDatabase.LoadAssetAtPath(lilDirectoryManager.GetMainFolderPath() + "/Texture/lil_bayer_16x16.png"); ditherMaxValue.floatValue = 255;} + EditorGUILayout.EndHorizontal(); + EditorGUI.indentLevel--; + } + } + RenderQueueField(); + if((renderingModeBuf >= RenderingMode.Transparent && renderingModeBuf != RenderingMode.FurCutout) || (isMulti && transparentModeMat.floatValue == 2.0f)) + { + #if LILTOON_VRCSDK3_WORLDS + if(material.renderQueue <= 2999 && zwrite.floatValue == 1.0f) + { + EditorGUILayout.HelpBox(GetLoc("sHelpTransparentForWorld"),MessageType.Warning); + } + #else + EditorGUILayout.HelpBox(GetLoc("sHelpRenderingTransparent"),MessageType.Warning); + #endif + } + if(isLite) + { + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(triMaskContent, triMask); + } + EditorGUILayout.EndVertical(); + + if(transparentModeBuf == TransparentMode.TwoPass) + { + EditorGUILayout.LabelField("PrePass"); + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(preOutType); + + int preBlendMode = -1; + if(preSrcBlend.floatValue == 1.0f && preDstBlend.floatValue == 10.0f) preBlendMode = 0; // Normal + if(preSrcBlend.floatValue == 1.0f && preDstBlend.floatValue == 1.0f) preBlendMode = 1; // Add + if(preSrcBlend.floatValue == 1.0f && preDstBlend.floatValue == 6.0f) preBlendMode = 2; // Screen + if(preSrcBlend.floatValue == 0.0f && preDstBlend.floatValue == 3.0f) preBlendMode = 3; // Mul + EditorGUI.BeginChangeCheck(); + preBlendMode = lilEditorGUI.Popup(Event.current.alt ? preSrcBlend.name + ", " + preDstBlend.name : GetLoc("sBlendMode"), preBlendMode, sBlendModeList); + if(EditorGUI.EndChangeCheck()) + { + switch(preBlendMode) + { + case 0: + preSrcBlend.floatValue = 1.0f; + preDstBlend.floatValue = 10.0f; + break; + case 1: + preSrcBlend.floatValue = 1.0f; + preDstBlend.floatValue = 1.0f; + break; + case 2: + preSrcBlend.floatValue = 1.0f; + preDstBlend.floatValue = 6.0f; + break; + case 3: + preSrcBlend.floatValue = 0.0f; + preDstBlend.floatValue = 3.0f; + break; + default: + break; + } + } + + LocalizedProperty(preCull); + LocalizedProperty(preZwrite); + LocalizedPropertyColorWithAlpha(preColor); + LocalizedProperty(preCutoff); + + edSet.isShowPrePreset = lilEditorGUI.DrawSimpleFoldout(GetLoc("sPresets"), edSet.isShowPrePreset, isCustomEditor); + if(edSet.isShowPrePreset) + { + EditorGUI.indentLevel++; + if(lilEditorGUI.Button(GetLoc("sTransparentPresetsPreWriteDepth"))) + { + preColor.colorValue = Color.white; + preOutType.floatValue = 2.0f; + preCutoff.floatValue = -0.001f; + preSrcBlend.floatValue = 0.0f; + preDstBlend.floatValue = 3.0f; + preZwrite.floatValue = 1.0f; + preCull.floatValue = cull.floatValue; + preStencilRef.floatValue = stencilRef.floatValue; + preStencilComp.floatValue = stencilComp.floatValue; + mainColor.colorValue = new Color(mainColor.colorValue.r, mainColor.colorValue.g, mainColor.colorValue.b, 1.0f); + ztest.floatValue = (float)CompareFunction.LessEqual; + } + if(lilEditorGUI.Button(GetLoc("sTransparentPresetsColorTransparent"))) + { + preColor.colorValue = new Color(0.75f,0.0f,0.0f,1.0f); + preOutType.floatValue = 1.0f; + preCutoff.floatValue = -0.001f; + preSrcBlend.floatValue = 0.0f; + preDstBlend.floatValue = 3.0f; + preZwrite.floatValue = 0.0f; + preCull.floatValue = cull.floatValue; + preStencilRef.floatValue = stencilRef.floatValue; + preStencilComp.floatValue = stencilComp.floatValue; + mainColor.colorValue = new Color(mainColor.colorValue.r, mainColor.colorValue.g, mainColor.colorValue.b, 0.0f); + cutoff.floatValue = -0.001f; + ztest.floatValue = (float)CompareFunction.LessEqual; + } + if(lilEditorGUI.Button(GetLoc("sTransparentPresetsBackAndFront"))) + { + preColor.colorValue = Color.white; + preOutType.floatValue = 0.0f; + preCutoff.floatValue = cutoff.floatValue; + preSrcBlend.floatValue = 1.0f; + preDstBlend.floatValue = 10.0f; + preZwrite.floatValue = 1.0f; + preCull.floatValue = 1.0f; + preStencilRef.floatValue = stencilRef.floatValue; + preStencilComp.floatValue = stencilComp.floatValue; + mainColor.colorValue = new Color(mainColor.colorValue.r, mainColor.colorValue.g, mainColor.colorValue.b, 1.0f); + cull.floatValue = 0.0f; + ztest.floatValue = (float)CompareFunction.Less; + } + if(lilEditorGUI.Button(GetLoc("sTransparentPresetsCutoutAndTransparent"))) + { + preColor.colorValue = Color.white; + preOutType.floatValue = 0.0f; + preCutoff.floatValue = 0.95f; + preSrcBlend.floatValue = 1.0f; + preDstBlend.floatValue = 10.0f; + preZwrite.floatValue = 1.0f; + preCull.floatValue = cull.floatValue; + preStencilRef.floatValue = stencilRef.floatValue; + preStencilComp.floatValue = stencilComp.floatValue; + mainColor.colorValue = new Color(mainColor.colorValue.r, mainColor.colorValue.g, mainColor.colorValue.b, 1.0f); + ztest.floatValue = (float)CompareFunction.LessEqual; + } + if(lilEditorGUI.Button(GetLoc("sTransparentPresetsFadeStencil"))) + { + preColor.colorValue = new Color(1.0f,1.0f,1.0f,0.5f); + preOutType.floatValue = 0.0f; + preCutoff.floatValue = cutoff.floatValue; + preSrcBlend.floatValue = 1.0f; + preDstBlend.floatValue = 10.0f; + preZwrite.floatValue = 1.0f; + preCull.floatValue = cull.floatValue; + preStencilRef.floatValue = stencilRef.floatValue; + preStencilComp.floatValue = (float)CompareFunction.Equal; + mainColor.colorValue = new Color(mainColor.colorValue.r, mainColor.colorValue.g, mainColor.colorValue.b, 1.0f); + ztest.floatValue = (float)CompareFunction.Less; + } + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + } + + EditorGUILayout.LabelField(GetLoc("sSimpleStencilSettings")); + EditorGUILayout.BeginVertical(customBox); + int stencilMode = -1; + if(stencilComp.floatValue == (float)CompareFunction.Always && stencilPass.floatValue == (float)StencilOp.Keep) stencilMode = 0; // Normal + if(stencilComp.floatValue == (float)CompareFunction.Always && stencilPass.floatValue == (float)StencilOp.Replace) stencilMode = 1; // Writer + if(stencilComp.floatValue == (float)CompareFunction.NotEqual && stencilPass.floatValue == (float)StencilOp.Keep) stencilMode = 2; // Reader + if(stencilComp.floatValue == (float)CompareFunction.Equal && stencilPass.floatValue == (float)StencilOp.Keep) stencilMode = 3; // Reader (Invert) + if(transparentModeBuf == TransparentMode.TwoPass && + stencilComp.floatValue == (float)CompareFunction.Always && stencilPass.floatValue == (float)StencilOp.Keep && + preStencilComp.floatValue == (float)CompareFunction.Equal && preStencilPass.floatValue == (float)StencilOp.Keep + ) stencilMode = 4; // Reader (Fade) + + int outlineStencilMode = -1; + + EditorGUI.BeginChangeCheck(); + if(transparentModeBuf == TransparentMode.TwoPass) stencilMode = lilEditorGUI.Popup("Mode", stencilMode, new[]{GetLoc("sStencilModeNormal"),GetLoc("sStencilModeWriter"),GetLoc("sStencilModeReader"),GetLoc("sStencilModeReaderInvert"),GetLoc("sStencilModeReaderFade")}); + else stencilMode = lilEditorGUI.Popup("Mode", stencilMode, new[]{GetLoc("sStencilModeNormal"),GetLoc("sStencilModeWriter"),GetLoc("sStencilModeReader"),GetLoc("sStencilModeReaderInvert")}); + if(isOutl) + { + if(outlineStencilComp.floatValue == (float)CompareFunction.Always && outlineStencilPass.floatValue == (float)StencilOp.Keep) outlineStencilMode = 0; // Normal + if(outlineStencilComp.floatValue == (float)CompareFunction.Always && outlineStencilPass.floatValue == (float)StencilOp.Replace) outlineStencilMode = 1; // Writer + if(outlineStencilComp.floatValue == (float)CompareFunction.NotEqual && outlineStencilPass.floatValue == (float)StencilOp.Keep) outlineStencilMode = 2; // Reader + if(outlineStencilComp.floatValue == (float)CompareFunction.Equal && outlineStencilPass.floatValue == (float)StencilOp.Keep) outlineStencilMode = 3; // Reader (Invert) + outlineStencilMode = lilEditorGUI.Popup("Mode (" + GetLoc("sOutline") + ")", outlineStencilMode, new[]{GetLoc("sStencilModeNormal"),GetLoc("sStencilModeWriter"),GetLoc("sStencilModeReader"),GetLoc("sStencilModeReaderInvert")}); + } + if(EditorGUI.EndChangeCheck()) + { + SetupMaterialWithRenderingMode(renderingModeBuf, transparentModeBuf); + int shaderRenderQueue = isMulti ? material.renderQueue : material.shader.renderQueue; + switch(stencilMode) + { + case 0: + stencilRef.floatValue = 0; + stencilComp.floatValue = (float)CompareFunction.Always; + stencilPass.floatValue = (float)StencilOp.Keep; + if(!isMulti) material.renderQueue = -1; + break; + case 1: // Writer + stencilComp.floatValue = (float)CompareFunction.Always; + stencilPass.floatValue = (float)StencilOp.Replace; + material.renderQueue = shaderRenderQueue > 2451 ? -1 : 2451; + break; + case 2: // Reader + stencilComp.floatValue = (float)CompareFunction.NotEqual; + stencilPass.floatValue = (float)StencilOp.Keep; + material.renderQueue = shaderRenderQueue > 2452 ? -1 : 2452; + break; + case 3: // Reader (Invert) + stencilComp.floatValue = (float)CompareFunction.Equal; + stencilPass.floatValue = (float)StencilOp.Keep; + material.renderQueue = shaderRenderQueue > 2452 ? -1 : 2452; + break; + case 4: // Reader (Fade) + stencilComp.floatValue = (float)CompareFunction.Always; + stencilPass.floatValue = (float)StencilOp.Keep; + material.renderQueue = shaderRenderQueue > 2452 ? -1 : 2452; + break; + default: + break; + } + if(stencilMode != 0 && stencilRef.floatValue == 0) stencilRef.floatValue = 1; + stencilReadMask.floatValue = 255.0f; + stencilWriteMask.floatValue = 255.0f; + stencilFail.floatValue = (float)StencilOp.Keep; + stencilZFail.floatValue = (float)StencilOp.Keep; + if(isOutl) + { + switch(outlineStencilMode) + { + case 0: + outlineStencilComp.floatValue = (float)CompareFunction.Always; + outlineStencilPass.floatValue = (float)StencilOp.Keep; + break; + case 1: // Writer + outlineStencilComp.floatValue = (float)CompareFunction.Always; + outlineStencilPass.floatValue = (float)StencilOp.Replace; + break; + case 2: // Reader + outlineStencilComp.floatValue = (float)CompareFunction.NotEqual; + outlineStencilPass.floatValue = (float)StencilOp.Keep; + break; + case 3: // Reader (Invert) + outlineStencilComp.floatValue = (float)CompareFunction.Equal; + outlineStencilPass.floatValue = (float)StencilOp.Keep; + break; + default: + break; + } + outlineStencilRef.floatValue = stencilRef.floatValue; + outlineStencilReadMask.floatValue = 255.0f; + outlineStencilWriteMask.floatValue = 255.0f; + outlineStencilFail.floatValue = (float)StencilOp.Keep; + outlineStencilZFail.floatValue = (float)StencilOp.Keep; + } + if(isFur) + { + furStencilRef.floatValue = stencilRef.floatValue; + furStencilComp.floatValue = stencilComp.floatValue; + furStencilPass.floatValue = stencilPass.floatValue; + furStencilReadMask.floatValue = stencilReadMask.floatValue; + furStencilWriteMask.floatValue = stencilWriteMask.floatValue; + furStencilFail.floatValue = stencilFail.floatValue; + furStencilZFail.floatValue = stencilZFail.floatValue; + } + if(transparentModeBuf == TransparentMode.TwoPass) + { + ztest.floatValue = stencilMode == 4 ? (float)CompareFunction.Less : (float)CompareFunction.LessEqual; + preStencilRef.floatValue = stencilRef.floatValue; + preStencilComp.floatValue = stencilMode == 4 ? (float)CompareFunction.Equal : stencilComp.floatValue; + preStencilPass.floatValue = stencilPass.floatValue; + preStencilReadMask.floatValue = stencilReadMask.floatValue; + preStencilWriteMask.floatValue = stencilWriteMask.floatValue; + preStencilFail.floatValue = stencilFail.floatValue; + preStencilZFail.floatValue = stencilZFail.floatValue; + } + } + if(stencilMode != 0 || isOutl && outlineStencilMode != 0) + { + EditorGUI.BeginChangeCheck(); + LocalizedProperty(stencilRef); + if(EditorGUI.EndChangeCheck()) + { + if(isOutl) outlineStencilRef.floatValue = stencilRef.floatValue; + if(isFur) furStencilRef.floatValue = stencilRef.floatValue; + if(transparentModeBuf == TransparentMode.TwoPass) preStencilRef.floatValue = stencilRef.floatValue; + } + } + EditorGUILayout.EndVertical(); + } + } + + private void DrawLightingSettings() + { + if(!ShouldDrawBlock(PropertyBlock.Lighting)) return; + edSet.isShowLightingSettings = lilEditorGUI.Foldout(GetLoc("sLightingSettings"), edSet.isShowLightingSettings); + DrawMenuButton(GetLoc("sAnchorLighting"), PropertyBlock.Lighting); + if(edSet.isShowLightingSettings) + { + EditorGUILayout.LabelField(GetLoc("sBaseSetting")); + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(lightMinLimit); + LocalizedProperty(lightMaxLimit); + LocalizedProperty(monochromeLighting); + if(shadowEnvStrength != null) LocalizedProperty(shadowEnvStrength); + var button = lilEditorGUI.Buttons(GetLoc("sLightingPreset"), GetLoc("sLightingPresetDefault"), GetLoc("sLightingPresetSemiMonochrome")); + if(button[0]) ApplyLightingPreset(LightingPreset.Default); + if(button[1]) ApplyLightingPreset(LightingPreset.SemiMonochrome); + EditorGUILayout.EndVertical(); + + EditorGUILayout.LabelField(GetLoc("sAdvanced")); + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(asUnlit); + if(asUnlit.floatValue != 0 && lilEditorGUI.AutoFixHelpBox(GetLoc("sAsUnlitWarn"))) + { + asUnlit.floatValue = 0.0f; + } + LocalizedProperty(vertexLightStrength); + LocalizedProperty(lightDirectionOverride); + if(isTransparent || (isFur && !isCutout)) LocalizedProperty(alphaBoostFA); + BlendOpFASetting(); + LocalizedProperty(beforeExposureLimit); + LocalizedProperty(lilDirectionalLightStrength); + EditorGUILayout.EndVertical(); + } + } + + private void BlendOpFASetting() + { + if(blendOpFA == null) return; + int selecting = blendOpFA.floatValue == 0 ? 0 : (blendOpFA.floatValue == 4 ? 1 : 2); + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = blendOpFA.hasMixedValue; + selecting = lilEditorGUI.Popup(Event.current.alt ? blendOpFA.name : GetLoc("sLightBlending"), selecting, new string[]{GetLoc("sBlendingAdd"), GetLoc("sBlendingMax")}); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + blendOpFA.floatValue = selecting == 0 ? 0 : (selecting == 1 ? 4 : blendOpFA.floatValue); + } + } + + private void DrawLightingSettingsSimple() + { + if(!ShouldDrawBlock(PropertyBlock.Lighting)) return; + edSet.isShowLightingSettings = lilEditorGUI.Foldout(GetLoc("sLightingSettings"), edSet.isShowLightingSettings); + DrawMenuButton(GetLoc("sAnchorLighting"), PropertyBlock.Lighting); + if(edSet.isShowLightingSettings) + { + EditorGUILayout.LabelField(GetLoc("sBaseSetting")); + EditorGUILayout.BeginVertical(customBox); + LocalizedProperty(lightMinLimit); + LocalizedProperty(lightMaxLimit); + LocalizedProperty(monochromeLighting); + if(shadowEnvStrength != null) LocalizedProperty(shadowEnvStrength); + var button = lilEditorGUI.Buttons(GetLoc("sLightingPreset"), GetLoc("sLightingPresetDefault"), GetLoc("sLightingPresetSemiMonochrome")); + if(button[0]) ApplyLightingPreset(LightingPreset.Default); + if(button[1]) ApplyLightingPreset(LightingPreset.SemiMonochrome); + EditorGUILayout.EndVertical(); + } + } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs.meta new file mode 100644 index 00000000..3c26972a --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerBaseSetting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e1a5f0bc7029dfc44b613f325f188c31 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs new file mode 100644 index 00000000..107eb9db --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs @@ -0,0 +1,343 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + + private void DrawMainAdjustSettings(Material material) + { + edSet.isShowMainTone = lilEditorGUI.DrawSimpleFoldout(GetLoc("sColorAdjust"), edSet.isShowMainTone, isCustomEditor); + if(edSet.isShowMainTone) + { + LocalizedPropertyTexture(maskBlendContent, mainColorAdjustMask); + EditorGUI.indentLevel++; + EditorGUILayout.LabelField("HSV / Gamma", boldLabel); + ToneCorrectionGUI(mainTexHSVG, 1); + //EditorGUILayout.LabelField(GetLoc("sGradationMap"), boldLabel); + //LocalizedProperty(mainGradationStrength); + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(gradationMapContent, mainGradationTex, mainGradationStrength); + if(mainGradationStrength.floatValue != 0 && (lilEditorGUI.CheckPropertyToDraw(gradationMapContent) || lilEditorGUI.CheckPropertyToDraw(mainGradationTex))) + { + //LocalizedPropertyTexture(gradationContent, mainGradationTex); + EditorGUI.indentLevel++; + lilTextureUtils.GradientEditor(material, mainGrad, mainGradationTex, true); + EditorGUI.indentLevel--; + } + lilEditorGUI.DrawLine(); + TextureBakeGUI(material, 4); + EditorGUI.indentLevel--; + } + } + + private void DrawAlphaMaskSettings(Material material) + { + if(!ShouldDrawBlock(PropertyBlock.AlphaMask)) return; + if((renderingModeBuf == RenderingMode.Opaque && !isMulti) || (isMulti && transparentModeMat.floatValue == 0.0f)) + { + GUILayout.Label(GetLoc("sAlphaMaskWarnOpaque"), wrapLabel); + } + else + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(alphaMaskMode, false); + DrawMenuButton(GetLoc("sAnchorAlphaMask"), PropertyBlock.AlphaMask); + if(alphaMaskMode.floatValue != 0) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(alphaMaskContent, alphaMask); + UVSettingGUI(alphaMask); + + bool invertAlphaMask = alphaMaskScale.floatValue < 0; + float transparency = alphaMaskValue.floatValue - (invertAlphaMask ? 1.0f : 0.0f); + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = alphaMaskScale.hasMixedValue || alphaMaskValue.hasMixedValue; + invertAlphaMask = lilEditorGUI.Toggle(Event.current.alt ? alphaMaskScale.name : "Invert", invertAlphaMask); + transparency = lilEditorGUI.Slider(Event.current.alt ? alphaMaskScale.name + ", " + alphaMaskValue.name : "Transparency", transparency, -1.0f, 1.0f); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + alphaMaskScale.floatValue = invertAlphaMask ? -1.0f : 1.0f; + alphaMaskValue.floatValue = transparency + (invertAlphaMask ? 1.0f : 0.0f); + } + LocalizedProperty(cutoff); + + edSet.isAlphaMaskModeAdvanced = EditorGUILayout.Toggle("Show advanced editor", edSet.isAlphaMaskModeAdvanced); + if(edSet.isAlphaMaskModeAdvanced) + { + EditorGUI.indentLevel++; + LocalizedProperty(alphaMaskScale); + LocalizedProperty(alphaMaskValue); + EditorGUI.indentLevel--; + } + AlphamaskToTextureGUI(material); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + private void DrawShadowSettings() + { + if(!ShouldDrawBlock(PropertyBlock.Shadow)) return; + edSet.isShowShadow = lilEditorGUI.Foldout(GetLoc("sShadowSetting"), edSet.isShowShadow); + DrawMenuButton(GetLoc("sAnchorShadow"), PropertyBlock.Shadow); + if(edSet.isShowShadow) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useShadow, false); + DrawMenuButton(GetLoc("sAnchorShadow"), PropertyBlock.Shadow); + if(useShadow.floatValue == 1 && !isLite) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(shadowMaskType); + if(shadowMaskType.floatValue == 1.0f) + { + LocalizedPropertyTexture(maskBlendContent, shadowStrengthMask); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowStrengthMaskLOD); + LocalizedProperty(shadowFlatBorder); + LocalizedProperty(shadowFlatBlur); + EditorGUI.indentLevel -= 2; + LocalizedProperty(shadowStrength); + } + else if(shadowMaskType.floatValue == 2.0f) + { + LocalizedPropertyTexture(new GUIContent("SDF", "Right (R), Left (G)"), shadowStrengthMask); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowStrengthMaskLOD); + LocalizedProperty(shadowFlatBlur, "Blend Y Direction"); + EditorGUI.indentLevel -= 2; + LocalizedProperty(shadowStrength); + } + else + { + LocalizedPropertyTexture(maskStrengthContent, shadowStrengthMask, shadowStrength); + LocalizedProperty(shadowStrengthMaskLOD, 2); + } + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowColorType); + LocalizedPropertyTexture(shadow1stColorRGBAContent, shadowColorTex, shadowColor); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowBorder); + LocalizedProperty(shadowBlur); + LocalizedProperty(shadowNormalStrength); + LocalizedProperty(shadowReceive); + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(shadow2ndColorRGBAContent, shadow2ndColorTex, shadow2ndColor); + EditorGUI.indentLevel += 2; + LocalizedPropertyAlpha(shadow2ndColor); + if(shadow2ndColor.colorValue.a > 0) + { + LocalizedProperty(shadow2ndBorder); + LocalizedProperty(shadow2ndBlur); + LocalizedProperty(shadow2ndNormalStrength); + LocalizedProperty(shadow2ndReceive); + } + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(shadow3rdColorRGBAContent, shadow3rdColorTex, shadow3rdColor); + EditorGUI.indentLevel += 2; + LocalizedPropertyAlpha(shadow3rdColor); + if(shadow3rdColor.colorValue.a > 0) + { + LocalizedProperty(shadow3rdBorder); + LocalizedProperty(shadow3rdBlur); + LocalizedProperty(shadow3rdNormalStrength); + LocalizedProperty(shadow3rdReceive); + } + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowBorderColor); + LocalizedProperty(shadowBorderRange); + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowMainStrength); + LocalizedProperty(shadowEnvStrength); + LocalizedProperty(lilShadowCasterBias); + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(blurMaskRGBContent, shadowBlurMask); + LocalizedProperty(shadowBlurMaskLOD, 2); + lilEditorGUI.DrawLine(); + edSet.isShowShadowAO = lilEditorGUI.DrawSimpleFoldout(m_MaterialEditor, shadowAOMapContent, shadowBorderMask, edSet.isShowShadowAO, isCustomEditor); + if(edSet.isShowShadowAO) + { + EditorGUI.indentLevel += 1; + LocalizedProperty(shadowBorderMaskLOD); + LocalizedProperty(shadowPostAO); + float min1 = lilEditorGUI.GetRemapMinValue(shadowAOShift.vectorValue.x, shadowAOShift.vectorValue.y); + float max1 = lilEditorGUI.GetRemapMaxValue(shadowAOShift.vectorValue.x, shadowAOShift.vectorValue.y); + float min2 = lilEditorGUI.GetRemapMinValue(shadowAOShift.vectorValue.z, shadowAOShift.vectorValue.w); + float max2 = lilEditorGUI.GetRemapMaxValue(shadowAOShift.vectorValue.z, shadowAOShift.vectorValue.w); + float min3 = lilEditorGUI.GetRemapMinValue(shadowAOShift2.vectorValue.x, shadowAOShift2.vectorValue.y); + float max3 = lilEditorGUI.GetRemapMaxValue(shadowAOShift2.vectorValue.x, shadowAOShift2.vectorValue.y); + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = alphaMaskScale.hasMixedValue || alphaMaskValue.hasMixedValue; + min1 = lilEditorGUI.Slider(Event.current.alt ? shadowAOShift.name : "1st Min", min1, -0.01f, 1.01f); + max1 = lilEditorGUI.Slider(Event.current.alt ? shadowAOShift.name : "1st Max", max1, -0.01f, 1.01f); + min2 = lilEditorGUI.Slider(Event.current.alt ? shadowAOShift.name : "2nd Min", min2, -0.01f, 1.01f); + max2 = lilEditorGUI.Slider(Event.current.alt ? shadowAOShift.name : "2nd Max", max2, -0.01f, 1.01f); + min3 = lilEditorGUI.Slider(Event.current.alt ? shadowAOShift2.name : "3rd Min", min3, -0.01f, 1.01f); + max3 = lilEditorGUI.Slider(Event.current.alt ? shadowAOShift2.name : "3rd Max", max3, -0.01f, 1.01f); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + if(min1 == max1) max1 += 0.001f; + if(min2 == max2) max2 += 0.001f; + if(min3 == max3) max3 += 0.001f; + shadowAOShift.vectorValue = new Vector4( + lilEditorGUI.GetRemapScaleValue(min1, max1), + lilEditorGUI.GetRemapOffsetValue(min1, max1), + lilEditorGUI.GetRemapScaleValue(min2, max2), + lilEditorGUI.GetRemapOffsetValue(min2, max2) + ); + shadowAOShift2.vectorValue = new Vector4( + lilEditorGUI.GetRemapScaleValue(min3, max3), + lilEditorGUI.GetRemapOffsetValue(min3, max3), + 0.0f, + 0.0f + ); + } + EditorGUI.indentLevel -= 1; + } + EditorGUILayout.EndVertical(); + } + else if(useShadow.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(shadow1stColorRGBAContent, shadowColorTex); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowBorder); + LocalizedProperty(shadowBlur); + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(shadow2ndColorRGBAContent, shadow2ndColorTex); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadow2ndBorder); + LocalizedProperty(shadow2ndBlur); + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowEnvStrength); + LocalizedProperty(shadowBorderColor); + LocalizedProperty(shadowBorderRange); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + private void DrawShadowSettingsSimple() + { + if(!ShouldDrawBlock(PropertyBlock.Shadow)) return; + edSet.isShowShadow = lilEditorGUI.Foldout(GetLoc("sShadowSetting"), edSet.isShowShadow); + DrawMenuButton(GetLoc("sAnchorShadow"), PropertyBlock.Shadow); + if(edSet.isShowShadow) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useShadow, false); + DrawMenuButton(GetLoc("sAnchorShadow"), PropertyBlock.Shadow); + if(useShadow.floatValue == 1 && !isLite) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(shadowMaskType); + if(shadowMaskType.floatValue == 1.0f) + { + LocalizedPropertyTexture(maskBlendContent, shadowStrengthMask); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowFlatBorder); + LocalizedProperty(shadowFlatBlur); + EditorGUI.indentLevel -= 2; + LocalizedProperty(shadowStrength); + } + else if(shadowMaskType.floatValue == 2.0f) + { + LocalizedPropertyTexture(new GUIContent("SDF", "Right (R), Left (G)"), shadowStrengthMask); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowStrengthMaskLOD); + LocalizedProperty(shadowFlatBlur, "Blend Y Direction"); + EditorGUI.indentLevel -= 2; + LocalizedProperty(shadowStrength); + } + else + { + LocalizedPropertyTexture(maskStrengthContent, shadowStrengthMask, shadowStrength); + } + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowColorType); + LocalizedPropertyTexture(shadow1stColorRGBAContent, shadowColorTex, shadowColor); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowBorder); + LocalizedProperty(shadowBlur); + LocalizedProperty(shadowReceive); + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(shadow2ndColorRGBAContent, shadow2ndColorTex, shadow2ndColor); + EditorGUI.indentLevel += 2; + LocalizedPropertyAlpha(shadow2ndColor); + if(shadow2ndColor.colorValue.a > 0) + { + LocalizedProperty(shadow2ndBorder); + LocalizedProperty(shadow2ndBlur); + LocalizedProperty(shadow2ndReceive); + } + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(shadow3rdColorRGBAContent, shadow3rdColorTex, shadow3rdColor); + EditorGUI.indentLevel += 2; + LocalizedPropertyAlpha(shadow3rdColor); + if(shadow3rdColor.colorValue.a > 0) + { + LocalizedProperty(shadow3rdBorder); + LocalizedProperty(shadow3rdBlur); + LocalizedProperty(shadow3rdReceive); + } + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowBorderColor); + LocalizedProperty(shadowBorderRange); + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowMainStrength); + EditorGUILayout.EndVertical(); + } + else if(useShadow.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedPropertyTexture(shadow1stColorRGBAContent, shadowColorTex); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadowBorder); + LocalizedProperty(shadowBlur); + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedPropertyTexture(shadow2ndColorRGBAContent, shadow2ndColorTex); + EditorGUI.indentLevel += 2; + LocalizedProperty(shadow2ndBorder); + LocalizedProperty(shadow2ndBlur); + EditorGUI.indentLevel -= 2; + lilEditorGUI.DrawLine(); + LocalizedProperty(shadowEnvStrength); + LocalizedProperty(shadowBorderColor); + LocalizedProperty(shadowBorderRange); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs.meta new file mode 100644 index 00000000..e2a130b0 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerColorSetting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e72fd407bb6bb647bcedba2ea06916b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs new file mode 100644 index 00000000..7f085d8b --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs @@ -0,0 +1,408 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + private void DrawMatCapSettings() + { + if(!ShouldDrawBlock(PropertyBlock.MatCaps)) return; + edSet.isShowMatCap = lilEditorGUI.Foldout(GetLoc("sMatCapSetting"), edSet.isShowMatCap); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCaps); + if(edSet.isShowMatCap) + { + if(!isLite) + { + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap + if(ShouldDrawBlock(PropertyBlock.MatCap1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMatCap, false); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCap1st); + if(useMatCap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + MatCapTextureGUI(ref edSet.isShowMatCapUV, matcapContent, matcapTex, matcapColor, matcapBlendUV1, matcapZRotCancel, matcapPerspective, matcapVRParallaxStrength); + LocalizedPropertyAlpha(matcapColor); + LocalizedProperty(matcapMainStrength); + LocalizedProperty(matcapNormalStrength); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowMatCapBlendMask, maskBlendRGBContent, matcapBlendMask, matcapBlend); + LocalizedProperty(matcapEnableLighting); + LocalizedProperty(matcapShadowMask); + LocalizedProperty(matcapBackfaceMask); + LocalizedProperty(matcapLod); + LocalizedProperty(matcapBlendMode); + if(matcapEnableLighting.floatValue != 0.0f && matcapBlendMode.floatValue == 3.0f && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpMatCapBlending"))) + { + matcapEnableLighting.floatValue = 0.0f; + } + if(isTransparent) LocalizedProperty(matcapApplyTransparency); + lilEditorGUI.DrawLine(); + LocalizedProperty(matcapCustomNormal); + if(matcapCustomNormal.floatValue == 1) + { + TextureGUI(ref edSet.isShowMatCapBumpMap, normalMapContent, matcapBumpMap, matcapBumpScale); + } + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap 2nd + if(ShouldDrawBlock(PropertyBlock.MatCap2nd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMatCap2nd, false); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCap2nd); + if(useMatCap2nd.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + MatCapTextureGUI(ref edSet.isShowMatCap2ndUV, matcapContent, matcap2ndTex, matcap2ndColor, matcap2ndBlendUV1, matcap2ndZRotCancel, matcap2ndPerspective, matcap2ndVRParallaxStrength); + LocalizedPropertyAlpha(matcap2ndColor); + LocalizedProperty(matcap2ndMainStrength); + LocalizedProperty(matcap2ndNormalStrength); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowMatCap2ndBlendMask, maskBlendRGBContent, matcap2ndBlendMask, matcap2ndBlend); + LocalizedProperty(matcap2ndEnableLighting); + LocalizedProperty(matcap2ndShadowMask); + LocalizedProperty(matcap2ndBackfaceMask); + LocalizedProperty(matcap2ndLod); + LocalizedProperty(matcap2ndBlendMode); + if(matcap2ndEnableLighting.floatValue != 0.0f && matcap2ndBlendMode.floatValue == 3.0f && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpMatCapBlending"))) + { + matcap2ndEnableLighting.floatValue = 0.0f; + } + if(isTransparent) LocalizedProperty(matcap2ndApplyTransparency); + lilEditorGUI.DrawLine(); + LocalizedProperty(matcap2ndCustomNormal); + if(matcap2ndCustomNormal.floatValue == 1) + { + TextureGUI(ref edSet.isShowMatCap2ndBumpMap, normalMapContent, matcap2ndBumpMap, matcap2ndBumpScale); + } + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + else + { + if(ShouldDrawBlock(PropertyBlock.MatCap1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMatCap, false); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCap1st); + if(useMatCap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + MatCapTextureGUI(ref edSet.isShowMatCapUV, matcapContent, matcapTex, matcapBlendUV1, matcapZRotCancel, matcapPerspective, matcapVRParallaxStrength); + LocalizedProperty(matcapMul); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } + } + + private void DrawMatCapSettingsSimple() + { + if(!ShouldDrawBlock(PropertyBlock.MatCaps)) return; + edSet.isShowMatCap = lilEditorGUI.Foldout(GetLoc("sMatCapSetting"), edSet.isShowMatCap); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCaps); + if(edSet.isShowMatCap) + { + if(!isLite) + { + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap + if(ShouldDrawBlock(PropertyBlock.MatCap1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMatCap, false); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCap1st); + if(useMatCap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + MatCapTextureGUI(ref edSet.isShowMatCapUV, matcapContent, matcapTex, matcapColor, matcapBlendUV1, matcapZRotCancel, matcapPerspective, matcapVRParallaxStrength); + LocalizedPropertyAlpha(matcapColor); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowMatCapBlendMask, maskBlendRGBContent, matcapBlendMask, matcapBlend); + LocalizedProperty(matcapEnableLighting); + LocalizedProperty(matcapBlendMode); + if(matcapEnableLighting.floatValue != 0.0f && matcapBlendMode.floatValue == 3.0f && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpMatCapBlending"))) + { + matcapEnableLighting.floatValue = 0.0f; + } + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap 2nd + if(ShouldDrawBlock(PropertyBlock.MatCap2nd)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMatCap2nd, false); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCap2nd); + if(useMatCap2nd.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + MatCapTextureGUI(ref edSet.isShowMatCap2ndUV, matcapContent, matcap2ndTex, matcap2ndColor, matcap2ndBlendUV1, matcap2ndZRotCancel, matcap2ndPerspective, matcap2ndVRParallaxStrength); + LocalizedPropertyAlpha(matcap2ndColor); + lilEditorGUI.DrawLine(); + TextureGUI(ref edSet.isShowMatCap2ndBlendMask, maskBlendRGBContent, matcap2ndBlendMask, matcap2ndBlend); + LocalizedProperty(matcap2ndEnableLighting); + LocalizedProperty(matcap2ndBlendMode); + if(matcap2ndEnableLighting.floatValue != 0.0f && matcap2ndBlendMode.floatValue == 3.0f && lilEditorGUI.AutoFixHelpBox(GetLoc("sHelpMatCapBlending"))) + { + matcap2ndEnableLighting.floatValue = 0.0f; + } + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + else + { + if(ShouldDrawBlock(PropertyBlock.MatCap1st)) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useMatCap, false); + DrawMenuButton(GetLoc("sAnchorMatCap"), PropertyBlock.MatCap1st); + if(useMatCap.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + MatCapTextureGUI(ref edSet.isShowMatCapUV, matcapContent, matcapTex, matcapBlendUV1, matcapZRotCancel, matcapPerspective, matcapVRParallaxStrength); + LocalizedProperty(matcapMul); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } + } + + private void DrawRimSettings() + { + if(!ShouldDrawBlock(PropertyBlock.RimLight)) return; + edSet.isShowRim = lilEditorGUI.Foldout(GetLoc("sRimLightSetting"), edSet.isShowRim); + DrawMenuButton(GetLoc("sAnchorRimLight"), PropertyBlock.RimLight); + if(edSet.isShowRim) + { + EditorGUILayout.BeginVertical(boxOuter); + if(!isLite) + { + LocalizedProperty(useRim, false); + DrawMenuButton(GetLoc("sAnchorRimLight"), PropertyBlock.RimLight); + if(useRim.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowRimColorTex, colorMaskRGBAContent, rimColorTex, rimColor); + LocalizedPropertyAlpha(rimColor); + LocalizedProperty(rimMainStrength); + LocalizedProperty(rimEnableLighting); + LocalizedProperty(rimShadowMask); + LocalizedProperty(rimBackfaceMask); + if(isTransparent) LocalizedProperty(rimApplyTransparency); + LocalizedProperty(rimBlendMode); + lilEditorGUI.DrawLine(); + LocalizedProperty(rimDirStrength); + if(rimDirStrength.floatValue != 0) + { + EditorGUI.indentLevel++; + LocalizedProperty(rimDirRange); + lilEditorGUI.InvBorderGUI(rimBorder); + LocalizedProperty(rimBlur); + lilEditorGUI.DrawLine(); + LocalizedProperty(rimIndirRange); + LocalizedProperty(rimIndirColor); + lilEditorGUI.InvBorderGUI(rimIndirBorder); + LocalizedProperty(rimIndirBlur); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + } + else + { + lilEditorGUI.InvBorderGUI(rimBorder); + LocalizedProperty(rimBlur); + } + LocalizedProperty(rimNormalStrength); + LocalizedProperty(rimFresnelPower); + LocalizedProperty(rimVRParallaxStrength); + EditorGUILayout.EndVertical(); + } + } + else + { + LocalizedProperty(useRim, false); + DrawMenuButton(GetLoc("sAnchorRimLight"), PropertyBlock.RimLight); + if(useRim.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(rimColor); + LocalizedProperty(rimShadowMask); + lilEditorGUI.DrawLine(); + lilEditorGUI.InvBorderGUI(rimBorder); + LocalizedProperty(rimBlur); + LocalizedProperty(rimFresnelPower); + EditorGUILayout.EndVertical(); + } + } + EditorGUILayout.EndVertical(); + } + } + + private void DrawRimSettingsSimple() + { + if(!ShouldDrawBlock(PropertyBlock.RimLight)) return; + edSet.isShowRim = lilEditorGUI.Foldout(GetLoc("sRimLightSetting"), edSet.isShowRim); + DrawMenuButton(GetLoc("sAnchorRimLight"), PropertyBlock.RimLight); + if(edSet.isShowRim) + { + EditorGUILayout.BeginVertical(boxOuter); + if(!isLite) + { + LocalizedProperty(useRim, false); + DrawMenuButton(GetLoc("sAnchorRimLight"), PropertyBlock.RimLight); + if(useRim.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + TextureGUI(ref edSet.isShowRimColorTex, colorMaskRGBAContent, rimColorTex, rimColor); + LocalizedPropertyAlpha(rimColor); + LocalizedProperty(rimBlendMode); + lilEditorGUI.DrawLine(); + LocalizedProperty(rimDirStrength); + if(rimDirStrength.floatValue != 0) + { + EditorGUI.indentLevel++; + LocalizedProperty(rimDirRange); + lilEditorGUI.InvBorderGUI(rimBorder); + LocalizedProperty(rimBlur); + lilEditorGUI.DrawLine(); + LocalizedProperty(rimIndirRange); + LocalizedProperty(rimIndirColor); + lilEditorGUI.InvBorderGUI(rimIndirBorder); + LocalizedProperty(rimIndirBlur); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + } + else + { + lilEditorGUI.InvBorderGUI(rimBorder); + LocalizedProperty(rimBlur); + } + LocalizedProperty(rimFresnelPower); + EditorGUILayout.EndVertical(); + } + } + else + { + LocalizedProperty(useRim, false); + DrawMenuButton(GetLoc("sAnchorRimLight"), PropertyBlock.RimLight); + if(useRim.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(rimColor); + LocalizedProperty(rimShadowMask); + lilEditorGUI.DrawLine(); + lilEditorGUI.InvBorderGUI(rimBorder); + LocalizedProperty(rimBlur); + LocalizedProperty(rimFresnelPower); + EditorGUILayout.EndVertical(); + } + } + EditorGUILayout.EndVertical(); + } + } + + private void DrawGlitterSettings() + { + if(!ShouldDrawBlock(PropertyBlock.Glitter)) return; + edSet.isShowGlitter = lilEditorGUI.Foldout(GetLoc("sGlitterSetting"), edSet.isShowGlitter); + DrawMenuButton(GetLoc("sAnchorGlitter"), PropertyBlock.Glitter); + if(edSet.isShowGlitter) + { + EditorGUILayout.BeginVertical(boxOuter); + LocalizedProperty(useGlitter); + if(useGlitter.floatValue == 1) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + LocalizedProperty(glitterUVMode); + TextureGUI(ref edSet.isShowGlitterColorTex, colorMaskRGBAContent, glitterColorTex, glitterColor, glitterColorTex_UVMode, "UV Mode|UV0|UV1|UV2|UV3"); + EditorGUI.indentLevel++; + LocalizedPropertyAlpha(glitterColor); + LocalizedProperty(glitterMainStrength); + LocalizedProperty(glitterEnableLighting); + LocalizedProperty(glitterShadowMask); + LocalizedProperty(glitterBackfaceMask); + if(isTransparent) LocalizedProperty(glitterApplyTransparency); + EditorGUI.indentLevel--; + lilEditorGUI.DrawLine(); + LocalizedProperty(glitterApplyShape); + if(glitterApplyShape.floatValue > 0.5f) + { + EditorGUI.indentLevel++; + TextureGUI(ref edSet.isShowGlitterShapeTex, customMaskContent, glitterShapeTex); + LocalizedProperty(glitterAtras); + LocalizedProperty(glitterAngleRandomize); + EditorGUI.indentLevel--; + } + lilEditorGUI.DrawLine(); + + // Param1 + var scale = new Vector2(256.0f/glitterParams1.vectorValue.x, 256.0f/glitterParams1.vectorValue.y); + float size = glitterParams1.vectorValue.z == 0.0f ? 0.0f : Mathf.Sqrt(glitterParams1.vectorValue.z); + float density = Mathf.Sqrt(1.0f / glitterParams1.vectorValue.w) / 1.5f; + float sensitivity = lilEditorGUI.RoundFloat1000000(glitterSensitivity.floatValue / density); + density = lilEditorGUI.RoundFloat1000000(density); + EditorGUIUtility.wideMode = true; + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = glitterParams1.hasMixedValue || glitterSensitivity.hasMixedValue; + scale = lilEditorGUI.Vector2Field(Event.current.alt ? glitterParams1.name + ".xy" : GetLoc("sScale"), scale); + size = lilEditorGUI.Slider(Event.current.alt ? glitterParams1.name + ".z" : GetLoc("sParticleSize"), size, 0.0f, 2.0f); + EditorGUI.showMixedValue = false; + + LocalizedProperty(glitterScaleRandomize); + + EditorGUI.showMixedValue = glitterParams1.hasMixedValue || glitterSensitivity.hasMixedValue; + density = lilEditorGUI.Slider(Event.current.alt ? glitterParams1.name + ".w" : GetLoc("sDensity"), density, 0.001f, 1.0f); + sensitivity = lilEditorGUI.FloatField(Event.current.alt ? glitterSensitivity.name : GetLoc("sSensitivity"), sensitivity); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + scale.x = Mathf.Max(scale.x, 0.0000001f); + scale.y = Mathf.Max(scale.y, 0.0000001f); + glitterParams1.vectorValue = new Vector4(256.0f/scale.x, 256.0f/scale.y, size * size, 1.0f / (density * density * 1.5f * 1.5f)); + glitterSensitivity.floatValue = Mathf.Max(sensitivity * density, 0.25f); + } + + // Other + LocalizedProperty(glitterParams2); + LocalizedProperty(glitterVRParallaxStrength); + LocalizedProperty(glitterNormalStrength); + LocalizedProperty(glitterPostContrast); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndVertical(); + } + } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs.meta new file mode 100644 index 00000000..10bbcf1a --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilPropertyGroupDrawerNormalMapAndReflectionSetting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 384ee817bc400ad4dad6f361e84d8bb1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs b/Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs new file mode 100644 index 00000000..02dc90c3 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs @@ -0,0 +1,219 @@ +#if !LILTOON_VRCSDK3_AVATARS && !LILTOON_VRCSDK3_WORLDS && VRC_SDK_VRCSDK3 + #if UDON + #define LILTOON_VRCSDK3_WORLDS + #else + #define LILTOON_VRCSDK3_AVATARS + #endif +#endif +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + #region + private void DrawPresetGUI() + { + if(isLite) EditorGUILayout.LabelField(GetLoc("sPresetsNotAvailable"), wrapLabel); + else DrawPreset(); + } + + private void DrawSettingsGUI() + { + var applyButton = new GUIStyle(GUI.skin.button); + applyButton.normal.textColor = Color.red; + applyButton.fontStyle = FontStyle.Bold; + + bool isLocked = File.Exists(lilDirectoryManager.GetSettingLockPath()); + EditorGUI.BeginChangeCheck(); + ToggleGUI(GetLoc("sSettingLock"), ref isLocked); + if(EditorGUI.EndChangeCheck()) + { + if(isLocked) lilToonSetting.SaveLockedSetting(shaderSetting); + else lilToonSetting.DeleteLockedSetting(); + } + + + #if LILTOON_VRCSDK3_AVATARS + EditorGUI.BeginChangeCheck(); + GUI.enabled = !isLocked; + ToggleGUI(GetLoc("sShaderSettingOptimizeInTestBuild"), ref shaderSetting.isOptimizeInTestBuild); + GUI.enabled = true; + if(EditorGUI.EndChangeCheck()) lilToonSetting.SaveShaderSetting(shaderSetting); + #endif + + EditorGUI.BeginChangeCheck(); + ToggleGUI("Optimize in NDMF (Apply on Play)", ref shaderSetting.isOptimizeInNDMF); + ToggleGUI(GetLoc("sShaderSettingOptimizeInEditor"), ref shaderSetting.isDebugOptimize); + ToggleGUI("Migrate materials in startup", ref shaderSetting.isMigrateInStartUp); + edSet.isShowShaderSetting = lilEditorGUI.Foldout(GetLoc("sShaderSetting"), edSet.isShowShaderSetting); + lilEditorGUI.DrawHelpButton(GetLoc("sAnchorShaderSetting")); + if(edSet.isShowShaderSetting) + { + EditorGUILayout.BeginVertical(customBox); + GUI.enabled = !isLocked; + ToggleGUI(GetLoc("sSettingClippingCanceller"), ref shaderSetting.LIL_FEATURE_CLIPPING_CANCELLER); + GUI.enabled = true; + EditorGUILayout.EndVertical(); + } + + edSet.isShowOptimizationSetting = lilEditorGUI.Foldout(GetLoc("sSettingBuildSizeOptimization"), edSet.isShowOptimizationSetting); + if(edSet.isShowOptimizationSetting) + { + EditorGUILayout.BeginVertical(customBox); + EditorGUILayout.HelpBox(GetLoc("sHelpShaderSetting"),MessageType.Info); + ShaderSettingOptimizationGUI(); + EditorGUILayout.EndVertical(); + } + if(EditorGUI.EndChangeCheck()) + { + if(shaderSetting.isDebugOptimize) + { + lilToonSetting.ApplyShaderSettingOptimized(); + } + else + { + lilToonSetting.TurnOnAllShaderSetting(ref shaderSetting); + lilToonSetting.ApplyShaderSetting(shaderSetting); + } + } + + edSet.isShowDefaultValueSetting = lilEditorGUI.Foldout(GetLoc("sSettingDefaultValue"), edSet.isShowDefaultValueSetting); + if(edSet.isShowDefaultValueSetting) + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.BeginVertical(customBox); + ShaderSettingDefaultValueGUI(); + EditorGUILayout.EndVertical(); + if(EditorGUI.EndChangeCheck()) lilToonSetting.SaveShaderSetting(shaderSetting); + } + } + #endregion + + + //------------------------------------------------------------------------------------------------------------------------------ + // Shader Setting GUI + #region + private static void ShaderSettingOptimizationGUI() + { + GUI.enabled = !File.Exists(lilDirectoryManager.GetSettingLockPath()); + var RP = lilRenderPipelineReader.GetRP(); + if(RP == lilRenderPipeline.BRP) + { + ToggleGUI(GetLoc("sSettingApplyShadowFA"), ref shaderSetting.LIL_OPTIMIZE_APPLY_SHADOW_FA); + ToggleGUI(GetLoc("sSettingUseForwardAdd"), ref shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD); + ToggleGUI(GetLoc("sSettingUseForwardAddShadow"), ref shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD_SHADOW); + } + ToggleGUI(GetLoc("sSettingUseLightmap"), ref shaderSetting.LIL_OPTIMIZE_USE_LIGHTMAP); + if(RP == lilRenderPipeline.BRP) ToggleGUI("Fix for Deffered", ref shaderSetting.LIL_OPTIMIZE_DEFFERED); + GUI.enabled = true; + } + + private static void ShaderSettingDefaultValueGUI() + { + EditorGUILayout.LabelField("[GameObject] Fix lighting", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + shaderSetting.defaultAsUnlit = EditorGUILayout.Slider(GetLoc("sAsUnlit"), shaderSetting.defaultAsUnlit, 0.0f, 1.0f); + shaderSetting.defaultVertexLightStrength = EditorGUILayout.Slider(GetLoc("sVertexLightStrength"), shaderSetting.defaultVertexLightStrength, 0.0f, 1.0f); + shaderSetting.defaultLightMinLimit = EditorGUILayout.Slider(GetLoc("sLightMinLimit"), shaderSetting.defaultLightMinLimit, 0.0f, 1.0f); + shaderSetting.defaultLightMaxLimit = EditorGUILayout.Slider(GetLoc("sLightMaxLimit"), shaderSetting.defaultLightMaxLimit, 0.0f, 10.0f); + shaderSetting.defaultMonochromeLighting = EditorGUILayout.Slider(GetLoc("sMonochromeLighting"), shaderSetting.defaultMonochromeLighting, 0.0f, 1.0f); + shaderSetting.defaultBeforeExposureLimit = EditorGUILayout.FloatField(GetLoc("sBeforeExposureLimit"), shaderSetting.defaultBeforeExposureLimit); + shaderSetting.defaultlilDirectionalLightStrength = EditorGUILayout.Slider(GetLoc("sDirectionalLightStrength"), shaderSetting.defaultlilDirectionalLightStrength, 0.0f, 1.0f); + EditorGUI.indentLevel--; + EditorGUILayout.LabelField("[Model] Setup from FBX", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + shaderSetting.presetFace = (lilToonPreset)EditorGUILayout.ObjectField("Face", shaderSetting.presetFace, typeof(lilToonPreset), false); + shaderSetting.presetSkin = (lilToonPreset)EditorGUILayout.ObjectField("Skin", shaderSetting.presetSkin, typeof(lilToonPreset), false); + shaderSetting.presetHair = (lilToonPreset)EditorGUILayout.ObjectField("Hair", shaderSetting.presetHair, typeof(lilToonPreset), false); + shaderSetting.presetCloth = (lilToonPreset)EditorGUILayout.ObjectField("Cloth", shaderSetting.presetCloth, typeof(lilToonPreset), false); + EditorGUI.indentLevel--; + EditorGUILayout.LabelField("[Shader] LightMode Override", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + GUI.enabled = !File.Exists(lilDirectoryManager.GetSettingLockPath()); + shaderSetting.mainLightModeName = EditorGUILayout.TextField("Main", shaderSetting.mainLightModeName); + shaderSetting.outlineLightModeName = EditorGUILayout.TextField("Outline", shaderSetting.outlineLightModeName); + shaderSetting.preLightModeName = EditorGUILayout.TextField("Transparent backface", shaderSetting.preLightModeName); + shaderSetting.furLightModeName = EditorGUILayout.TextField("Fur", shaderSetting.furLightModeName); + shaderSetting.furPreLightModeName = EditorGUILayout.TextField("Fur Pre", shaderSetting.furPreLightModeName); + shaderSetting.gemPreLightModeName = EditorGUILayout.TextField("Gem Pre", shaderSetting.gemPreLightModeName); + if(lilEditorGUI.EditorButton("Apply")) lilToonSetting.ApplyShaderSetting(shaderSetting); + GUI.enabled = true; + EditorGUI.indentLevel--; + } + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Presets + #region + private static void DrawPreset() + { + GUILayout.Label(GetLoc("sPresets"), boldLabel); + if(presets == null) presets = lilToonPreset.LoadPresets(); + ShowPresets(); + EditorGUILayout.Space(); + GUILayout.BeginHorizontal(); + if(lilEditorGUI.EditorButton(GetLoc("sPresetRefresh"))) presets = lilToonPreset.LoadPresets(); + if(lilEditorGUI.EditorButton(GetLoc("sPresetSave"))) EditorWindow.GetWindow("[lilToon] Preset Window"); + GUILayout.EndHorizontal(); + } + + private static void ShowPresets() + { + string[] sCategorys = { GetLoc("sPresetCategorySkin"), + GetLoc("sPresetCategoryHair"), + GetLoc("sPresetCategoryCloth"), + GetLoc("sPresetCategoryNature"), + GetLoc("sPresetCategoryInorganic"), + GetLoc("sPresetCategoryEffect"), + GetLoc("sPresetCategoryOther") }; + for(int i=0; i<(int)lilPresetCategory.Other+1; i++) + { + edSet.isShowCategorys[i] = lilEditorGUI.Foldout(sCategorys[i], edSet.isShowCategorys[i]); + if(edSet.isShowCategorys[i]) + { + for(int j=0; j obj is Material); + foreach(var obj in objs) + { + lilToonPreset.ApplyPreset((Material)obj, presets[j], isMulti); + } + } + } + } + } + } + } + #endregion + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs.meta new file mode 100644 index 00000000..c96c681d --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilSettingAndPresetGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b0f018de02001574ea6b3049087178ca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs b/Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs new file mode 100644 index 00000000..784e45c5 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs @@ -0,0 +1,82 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Reflection; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public partial class lilToonInspector + { + //------------------------------------------------------------------------------------------------------------------------------ + // Shader variables + protected static Shader lts { get { return lilShaderManager.lts ; } set { lilShaderManager.lts = value; } } + protected static Shader ltsc { get { return lilShaderManager.ltsc ; } set { lilShaderManager.ltsc = value; } } + protected static Shader ltst { get { return lilShaderManager.ltst ; } set { lilShaderManager.ltst = value; } } + protected static Shader ltsot { get { return lilShaderManager.ltsot ; } set { lilShaderManager.ltsot = value; } } + protected static Shader ltstt { get { return lilShaderManager.ltstt ; } set { lilShaderManager.ltstt = value; } } + protected static Shader ltso { get { return lilShaderManager.ltso ; } set { lilShaderManager.ltso = value; } } + protected static Shader ltsco { get { return lilShaderManager.ltsco ; } set { lilShaderManager.ltsco = value; } } + protected static Shader ltsto { get { return lilShaderManager.ltsto ; } set { lilShaderManager.ltsto = value; } } + protected static Shader ltsoto { get { return lilShaderManager.ltsoto ; } set { lilShaderManager.ltsoto = value; } } + protected static Shader ltstto { get { return lilShaderManager.ltstto ; } set { lilShaderManager.ltstto = value; } } + protected static Shader ltsoo { get { return lilShaderManager.ltsoo ; } set { lilShaderManager.ltsoo = value; } } + protected static Shader ltscoo { get { return lilShaderManager.ltscoo ; } set { lilShaderManager.ltscoo = value; } } + protected static Shader ltstoo { get { return lilShaderManager.ltstoo ; } set { lilShaderManager.ltstoo = value; } } + protected static Shader ltstess { get { return lilShaderManager.ltstess ; } set { lilShaderManager.ltstess = value; } } + protected static Shader ltstessc { get { return lilShaderManager.ltstessc ; } set { lilShaderManager.ltstessc = value; } } + protected static Shader ltstesst { get { return lilShaderManager.ltstesst ; } set { lilShaderManager.ltstesst = value; } } + protected static Shader ltstessot { get { return lilShaderManager.ltstessot ; } set { lilShaderManager.ltstessot = value; } } + protected static Shader ltstesstt { get { return lilShaderManager.ltstesstt ; } set { lilShaderManager.ltstesstt = value; } } + protected static Shader ltstesso { get { return lilShaderManager.ltstesso ; } set { lilShaderManager.ltstesso = value; } } + protected static Shader ltstessco { get { return lilShaderManager.ltstessco ; } set { lilShaderManager.ltstessco = value; } } + protected static Shader ltstessto { get { return lilShaderManager.ltstessto ; } set { lilShaderManager.ltstessto = value; } } + protected static Shader ltstessoto { get { return lilShaderManager.ltstessoto; } set { lilShaderManager.ltstessoto = value; } } + protected static Shader ltstesstto { get { return lilShaderManager.ltstesstto; } set { lilShaderManager.ltstesstto = value; } } + protected static Shader ltsl { get { return lilShaderManager.ltsl ; } set { lilShaderManager.ltsl = value; } } + protected static Shader ltslc { get { return lilShaderManager.ltslc ; } set { lilShaderManager.ltslc = value; } } + protected static Shader ltslt { get { return lilShaderManager.ltslt ; } set { lilShaderManager.ltslt = value; } } + protected static Shader ltslot { get { return lilShaderManager.ltslot ; } set { lilShaderManager.ltslot = value; } } + protected static Shader ltsltt { get { return lilShaderManager.ltsltt ; } set { lilShaderManager.ltsltt = value; } } + protected static Shader ltslo { get { return lilShaderManager.ltslo ; } set { lilShaderManager.ltslo = value; } } + protected static Shader ltslco { get { return lilShaderManager.ltslco ; } set { lilShaderManager.ltslco = value; } } + protected static Shader ltslto { get { return lilShaderManager.ltslto ; } set { lilShaderManager.ltslto = value; } } + protected static Shader ltsloto { get { return lilShaderManager.ltsloto ; } set { lilShaderManager.ltsloto = value; } } + protected static Shader ltsltto { get { return lilShaderManager.ltsltto ; } set { lilShaderManager.ltsltto = value; } } + protected static Shader ltsref { get { return lilShaderManager.ltsref ; } set { lilShaderManager.ltsref = value; } } + protected static Shader ltsrefb { get { return lilShaderManager.ltsrefb ; } set { lilShaderManager.ltsrefb = value; } } + protected static Shader ltsfur { get { return lilShaderManager.ltsfur ; } set { lilShaderManager.ltsfur = value; } } + protected static Shader ltsfurc { get { return lilShaderManager.ltsfurc ; } set { lilShaderManager.ltsfurc = value; } } + protected static Shader ltsfurtwo { get { return lilShaderManager.ltsfurtwo ; } set { lilShaderManager.ltsfurtwo = value; } } + protected static Shader ltsfuro { get { return lilShaderManager.ltsfuro ; } set { lilShaderManager.ltsfuro = value; } } + protected static Shader ltsfuroc { get { return lilShaderManager.ltsfuroc ; } set { lilShaderManager.ltsfuroc = value; } } + protected static Shader ltsfurotwo { get { return lilShaderManager.ltsfurotwo; } set { lilShaderManager.ltsfurotwo = value; } } + protected static Shader ltsgem { get { return lilShaderManager.ltsgem ; } set { lilShaderManager.ltsgem = value; } } + protected static Shader ltsfs { get { return lilShaderManager.ltsfs ; } set { lilShaderManager.ltsfs = value; } } + protected static Shader ltsover { get { return lilShaderManager.ltsover ; } set { lilShaderManager.ltsover = value; } } + protected static Shader ltsoover { get { return lilShaderManager.ltsoover ; } set { lilShaderManager.ltsoover = value; } } + protected static Shader ltslover { get { return lilShaderManager.ltslover ; } set { lilShaderManager.ltslover = value; } } + protected static Shader ltsloover { get { return lilShaderManager.ltsloover ; } set { lilShaderManager.ltsloover = value; } } + protected static Shader ltsbaker { get { return lilShaderManager.ltsbaker ; } set { lilShaderManager.ltsbaker = value; } } + protected static Shader ltspo { get { return lilShaderManager.ltspo ; } set { lilShaderManager.ltspo = value; } } + protected static Shader ltspc { get { return lilShaderManager.ltspc ; } set { lilShaderManager.ltspc = value; } } + protected static Shader ltspt { get { return lilShaderManager.ltspt ; } set { lilShaderManager.ltspt = value; } } + protected static Shader ltsptesso { get { return lilShaderManager.ltsptesso ; } set { lilShaderManager.ltsptesso = value; } } + protected static Shader ltsptessc { get { return lilShaderManager.ltsptessc ; } set { lilShaderManager.ltsptessc = value; } } + protected static Shader ltsptesst { get { return lilShaderManager.ltsptesst ; } set { lilShaderManager.ltsptesst = value; } } + protected static Shader ltsm { get { return lilShaderManager.ltsm ; } set { lilShaderManager.ltsm = value; } } + protected static Shader ltsmo { get { return lilShaderManager.ltsmo ; } set { lilShaderManager.ltsmo = value; } } + protected static Shader ltsmref { get { return lilShaderManager.ltsmref ; } set { lilShaderManager.ltsmref = value; } } + protected static Shader ltsmfur { get { return lilShaderManager.ltsmfur ; } set { lilShaderManager.ltsmfur = value; } } + protected static Shader ltsmgem { get { return lilShaderManager.ltsmgem ; } set { lilShaderManager.ltsmgem = value; } } + protected static Shader mtoon { get { return lilShaderManager.mtoon ; } set { lilShaderManager.mtoon = value; } } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs.meta b/Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs.meta new file mode 100644 index 00000000..a2951cd0 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilInspector/lilShaderVariables.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 28452c3894426a44096c4820ea35601c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilLanguageManager.cs b/Assets/External/lilToon/Editor/lilLanguageManager.cs new file mode 100644 index 00000000..b381d882 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilLanguageManager.cs @@ -0,0 +1,261 @@ +#if UNITY_EDITOR +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace lilToon +{ + public class lilLanguageManager + { + private static readonly Dictionary loc = new Dictionary(); + + public static string sMainColorBranch; + public static string sCullModes; + public static string sBlendModes; + public static string sAlphaModes; + public static string sAlphaMaskModes; + public static string blinkSetting; + public static string sDistanceFadeSetting; + public static string sDistanceFadeSettingMode; + public static string sDissolveParams; + public static string sDissolveParamsMode; + public static string sDissolveParamsOther; + public static string sGlitterParams1; + public static string sGlitterParams2; + public static string sTransparentMode; + public static string sOutlineVertexColorUsages; + public static string sShadowColorTypes; + public static string sShadowMaskTypes; + public static string[] sRenderingModeList; + public static string[] sRenderingModeListLite; + public static string[] sTransparentModeList; + public static string[] sBlendModeList; + public static GUIContent mainColorRGBAContent; + public static GUIContent colorRGBAContent; + public static GUIContent colorAlphaRGBAContent; + public static GUIContent maskBlendContent; + public static GUIContent maskBlendRGBContent; + public static GUIContent maskBlendRGBAContent; + public static GUIContent colorMaskRGBAContent; + public static GUIContent alphaMaskContent; + public static GUIContent ditherContent; + public static GUIContent maskStrengthContent; + public static GUIContent normalMapContent; + public static GUIContent noiseMaskContent; + public static GUIContent adjustMaskContent; + public static GUIContent matcapContent; + public static GUIContent gradationContent; + public static GUIContent gradSpeedContent; + public static GUIContent smoothnessContent; + public static GUIContent metallicContent; + public static GUIContent parallaxContent; + public static GUIContent audioLinkMaskContent; + public static GUIContent audioLinkMaskSpectrumContent; + public static GUIContent customMaskContent; + public static GUIContent shadow1stColorRGBAContent; + public static GUIContent shadow2ndColorRGBAContent; + public static GUIContent shadow3rdColorRGBAContent; + public static GUIContent blurMaskRGBContent; + public static GUIContent shadowAOMapContent; + public static GUIContent widthMaskContent; + public static GUIContent lengthMaskContent; + public static GUIContent triMaskContent; + public static GUIContent cubemapContent; + public static GUIContent audioLinkLocalMapContent; + public static GUIContent gradationMapContent; + public static LanguageSettings langSet { get { return LanguageSettings.instance; } } + + public class LanguageSettings : ScriptableSingleton + { + public int languageNum = -1; + public string languageNames = ""; + public string languageName = "English"; + } + + public static string GetLoc(string value) { return loc.ContainsKey(value) ? loc[value] : value; } + public static string BuildParams(params string[] labels) { return string.Join("|", labels); } + + public static bool ShouldApplyTemp() + { + return string.IsNullOrEmpty(langSet.languageNames); + } + + public static void LoadCustomLanguage(string langFileGUID) + { + LoadLanguage(lilDirectoryManager.GUIDToPath(langFileGUID)); + } + + [Obsolete] + public static void InitializeLanguage() + { + if(langSet.languageNum == -1) + { + if(Application.systemLanguage == SystemLanguage.Japanese) langSet.languageNum = 1; + else if(Application.systemLanguage == SystemLanguage.Korean) langSet.languageNum = 2; + else if(Application.systemLanguage == SystemLanguage.ChineseSimplified) langSet.languageNum = 3; + else if(Application.systemLanguage == SystemLanguage.ChineseTraditional) langSet.languageNum = 4; + else langSet.languageNum = 0; + } + + if(loc.Count == 0) + { + UpdateLanguage(); + } + } + + public static void UpdateLanguage() + { + #pragma warning disable CS0612 + string langPath = lilDirectoryManager.GetEditorLanguageFileGUID(); + #pragma warning restore CS0612 + LoadLanguage(langPath); + InitializeLabels(); + } + + public static void SelectLang() + { + #pragma warning disable CS0612 + InitializeLanguage(); + #pragma warning restore CS0612 + int numbuf = langSet.languageNum; + langSet.languageNum = EditorGUILayout.Popup("Language", langSet.languageNum, langSet.languageNames.Split('\t')); + if(numbuf != langSet.languageNum) UpdateLanguage(); + if(!string.IsNullOrEmpty(GetLoc("sLanguageWarning"))) EditorGUILayout.HelpBox(GetLoc("sLanguageWarning"),MessageType.Warning); + } + + private static void LoadLanguage(string langPath) + { + if(string.IsNullOrEmpty(langPath) || !File.Exists(langPath)) return; + StreamReader sr = new StreamReader(langPath); + + string str = sr.ReadLine(); + langSet.languageNames = str.Substring(str.IndexOf("\t")+1); + langSet.languageName = langSet.languageNames.Split('\t')[langSet.languageNum]; + while((str = sr.ReadLine()) != null) + { + var lineContents = str.Split('\t'); + loc[lineContents[0]] = lineContents[langSet.languageNum+1]; + } + sr.Close(); + } + + private static void InitializeLabels() + { + loc["sCullModes"] = BuildParams(GetLoc("sCullMode"), GetLoc("sCullModeOff"), GetLoc("sCullModeFront"), GetLoc("sCullModeBack")); + loc["sBlendModes"] = BuildParams(GetLoc("sBlendMode"), GetLoc("sBlendModeNormal"), GetLoc("sBlendModeAdd"), GetLoc("sBlendModeScreen"), GetLoc("sBlendModeMul")); + loc["sAlphaModes"] = BuildParams(GetLoc("sTransparentMode"), GetLoc("sAlphaMaskModeNone"), GetLoc("sAlphaMaskModeReplace"), GetLoc("sAlphaMaskModeMul"), GetLoc("sAlphaMaskModeAdd"), GetLoc("sAlphaMaskModeSub")); + loc["sAlphaMaskModes"] = BuildParams(GetLoc("sAlphaMask"), GetLoc("sAlphaMaskModeNone"), GetLoc("sAlphaMaskModeReplace"), GetLoc("sAlphaMaskModeMul"), GetLoc("sAlphaMaskModeAdd"), GetLoc("sAlphaMaskModeSub")); + loc["sBlinkSettings"] = BuildParams(GetLoc("sBlinkStrength"), GetLoc("sBlinkType"), GetLoc("sBlinkSpeed"), GetLoc("sBlinkOffset")); + loc["sDistanceFadeSettings"] = BuildParams(GetLoc("sStartDistance"), GetLoc("sEndDistance"), GetLoc("sStrength"), GetLoc("sBackfaceForceShadow")); + loc["sDistanceFadeModes"] = BuildParams("Mode", GetLoc("sVertex"), GetLoc("sDissolveModePosition")); + loc["sDissolveParams"] = BuildParams(GetLoc("sDissolveMode"), GetLoc("sDissolveModeNone"), GetLoc("sDissolveModeAlpha"), GetLoc("sDissolveModeUV"), GetLoc("sDissolveModePosition"), GetLoc("sDissolveShape"), GetLoc("sDissolveShapePoint"), GetLoc("sDissolveShapeLine"), GetLoc("sBorder"), GetLoc("sBlur")); + loc["sDissolveParamsModes"] = BuildParams(GetLoc("sDissolve"), GetLoc("sDissolveModeNone"), GetLoc("sDissolveModeAlpha"), GetLoc("sDissolveModeUV"), GetLoc("sDissolveModePosition")); + loc["sDissolveParamsOther"] = BuildParams(GetLoc("sDissolveShape"), GetLoc("sDissolveShapePoint"), GetLoc("sDissolveShapeLine"), GetLoc("sBorder"), GetLoc("sBlur"), "Dummy"); + loc["sGlitterParams2"] = BuildParams(GetLoc("sBlinkSpeed"), GetLoc("sAngleLimit"), GetLoc("sRimLightDirection"), GetLoc("sColorRandomness")); + loc["sOutlineVertexColorUsages"] = BuildParams(GetLoc("sVertexColor"), GetLoc("sNone"), GetLoc("sVertexR2Width"), GetLoc("sVertexRGBA2Normal")); + loc["sShadowColorTypes"] = BuildParams(GetLoc("sColorType"), GetLoc("sColorTypeNormal"), GetLoc("sColorTypeLUT")); + loc["sShadowMaskTypes"] = BuildParams(GetLoc("sMaskType"), GetLoc("sStrength"), GetLoc("sFlat"), "SDF"); + loc["sHSVGs"] = BuildParams(GetLoc("sHue"), GetLoc("sSaturation"), GetLoc("sValue"), GetLoc("sGamma")); + loc["sScrollRotates"] = BuildParams(GetLoc("sAngle"), GetLoc("sUVAnimation"), GetLoc("sScroll"), GetLoc("sRotate")); + loc["sDecalAnimations"] = BuildParams(GetLoc("sAnimation"), GetLoc("sXFrames"), GetLoc("sYFrames"), GetLoc("sFrames"), GetLoc("sFPS")); + loc["sDecalSubParams"] = BuildParams(GetLoc("sXRatio"), GetLoc("sYRatio"), GetLoc("sFixBorder")); + loc["sAudioLinkUVModes"] = BuildParams(GetLoc("sAudioLinkUVMode"), GetLoc("sAudioLinkUVModeNone"), GetLoc("sAudioLinkUVModeRim"), GetLoc("sAudioLinkUVModeUV"), GetLoc("sAudioLinkUVModeMask"), GetLoc("sAudioLinkUVModeMask") + " (Spectrum)", GetLoc("sAudioLinkUVModePosition")); + loc["sAudioLinkVertexUVModes"] = BuildParams(GetLoc("sAudioLinkUVMode"), GetLoc("sAudioLinkUVModeNone"), GetLoc("sAudioLinkUVModePosition"), GetLoc("sAudioLinkUVModeUV"), GetLoc("sAudioLinkUVModeMask")); + loc["sAudioLinkVertexStrengths"] = BuildParams(GetLoc("sAudioLinkMovingVector"), GetLoc("sAudioLinkNormalStrength")); + loc["sAudioLinkLocalMapParams"] = BuildParams(GetLoc("sAudioLinkLocalMapBPM"), GetLoc("sAudioLinkLocalMapNotes"), GetLoc("sOffset")); + loc["sFakeShadowVectors"] = BuildParams(GetLoc("sVector"), GetLoc("sOffset")); + loc["sFurVectors"] = BuildParams(GetLoc("sVector"), GetLoc("sLength")); + loc["sPreOutTypes"] = BuildParams(GetLoc("sOutType"), GetLoc("sOutTypeNormal"), GetLoc("sOutTypeFlat"), GetLoc("sOutTypeMono")); + loc["sLightDirectionOverrides"] = BuildParams(GetLoc("sLightDirectionOverride"), GetLoc("sObjectFollowing")); + + sCullModes = BuildParams(GetLoc("sCullMode"), GetLoc("sCullModeOff"), GetLoc("sCullModeFront"), GetLoc("sCullModeBack")); + sBlendModes = BuildParams(GetLoc("sBlendMode"), GetLoc("sBlendModeNormal"), GetLoc("sBlendModeAdd"), GetLoc("sBlendModeScreen"), GetLoc("sBlendModeMul")); + sAlphaModes = BuildParams(GetLoc("sTransparentMode"), GetLoc("sAlphaMaskModeNone"), GetLoc("sAlphaMaskModeReplace"), GetLoc("sAlphaMaskModeMul"), GetLoc("sAlphaMaskModeAdd"), GetLoc("sAlphaMaskModeSub")); + sAlphaMaskModes = BuildParams(GetLoc("sAlphaMask"), GetLoc("sAlphaMaskModeNone"), GetLoc("sAlphaMaskModeReplace"), GetLoc("sAlphaMaskModeMul"), GetLoc("sAlphaMaskModeAdd"), GetLoc("sAlphaMaskModeSub")); + blinkSetting = BuildParams(GetLoc("sBlinkStrength"), GetLoc("sBlinkType"), GetLoc("sBlinkSpeed"), GetLoc("sBlinkOffset")); + sDistanceFadeSetting = BuildParams(GetLoc("sStartDistance"), GetLoc("sEndDistance"), GetLoc("sStrength"), GetLoc("sBackfaceForceShadow")); + sDistanceFadeSettingMode = BuildParams("Mode", GetLoc("sVertex"), GetLoc("sDissolveModePosition")); + sDissolveParams = BuildParams(GetLoc("sDissolveMode"), GetLoc("sDissolveModeNone"), GetLoc("sDissolveModeAlpha"), GetLoc("sDissolveModeUV"), GetLoc("sDissolveModePosition"), GetLoc("sDissolveShape"), GetLoc("sDissolveShapePoint"), GetLoc("sDissolveShapeLine"), GetLoc("sBorder"), GetLoc("sBlur")); + sDissolveParamsMode = BuildParams(GetLoc("sDissolve"), GetLoc("sDissolveModeNone"), GetLoc("sDissolveModeAlpha"), GetLoc("sDissolveModeUV"), GetLoc("sDissolveModePosition")); + sDissolveParamsOther = BuildParams(GetLoc("sDissolveShape"), GetLoc("sDissolveShapePoint"), GetLoc("sDissolveShapeLine"), GetLoc("sBorder"), GetLoc("sBlur"), "Dummy"); + sGlitterParams1 = BuildParams("Tiling", GetLoc("sParticleSize"), GetLoc("sContrast")); + sGlitterParams2 = BuildParams(GetLoc("sBlinkSpeed"), GetLoc("sAngleLimit"), GetLoc("sRimLightDirection"), GetLoc("sColorRandomness")); + sTransparentMode = BuildParams(GetLoc("sRenderingMode"), GetLoc("sRenderingModeOpaque"), GetLoc("sRenderingModeCutout"), GetLoc("sRenderingModeTransparent"), GetLoc("sRenderingModeRefraction"), GetLoc("sRenderingModeFur"), GetLoc("sRenderingModeFurCutout"), GetLoc("sRenderingModeGem")); + sRenderingModeList = new[]{GetLoc("sRenderingModeOpaque"), GetLoc("sRenderingModeCutout"), GetLoc("sRenderingModeTransparent"), GetLoc("sRenderingModeRefraction"), GetLoc("sRenderingModeRefractionBlur"), GetLoc("sRenderingModeFur"), GetLoc("sRenderingModeFurCutout"), GetLoc("sRenderingModeFurTwoPass"), GetLoc("sRenderingModeGem")}; + sRenderingModeListLite = new[]{GetLoc("sRenderingModeOpaque"), GetLoc("sRenderingModeCutout"), GetLoc("sRenderingModeTransparent")}; + sTransparentModeList = new[]{GetLoc("sTransparentModeNormal"), GetLoc("sTransparentModeOnePass"), GetLoc("sTransparentModeTwoPass")}; + sBlendModeList = new[]{GetLoc("sBlendModeNormal"), GetLoc("sBlendModeAdd"), GetLoc("sBlendModeScreen"), GetLoc("sBlendModeMul")}; + sOutlineVertexColorUsages = BuildParams(GetLoc("sVertexColor"), GetLoc("sNone"), GetLoc("sVertexR2Width"), GetLoc("sVertexRGBA2Normal")); + sShadowColorTypes = BuildParams(GetLoc("sColorType"), GetLoc("sColorTypeNormal"), GetLoc("sColorTypeLUT")); + sShadowMaskTypes = BuildParams(GetLoc("sMaskType"), GetLoc("sStrength"), GetLoc("sFlat"), "SDF"); + colorRGBAContent = new GUIContent(GetLoc("sColor"), GetLoc("sTextureRGBA")); + colorAlphaRGBAContent = new GUIContent(GetLoc("sColorAlpha"), GetLoc("sTextureRGBA")); + maskBlendContent = new GUIContent(GetLoc("sMask"), GetLoc("sBlendR")); + maskBlendRGBContent = new GUIContent(GetLoc("sMask"), GetLoc("sTextureRGB")); + maskBlendRGBAContent = new GUIContent(GetLoc("sMask"), GetLoc("sTextureRGBA")); + colorMaskRGBAContent = new GUIContent(GetLoc("sColor") + " / " + GetLoc("sMask"), GetLoc("sTextureRGBA")); + alphaMaskContent = new GUIContent(GetLoc("sAlphaMask"), GetLoc("sAlphaR")); + ditherContent = new GUIContent(GetLoc("sDither"), GetLoc("sAlphaR")); + maskStrengthContent = new GUIContent(GetLoc("sStrengthMask"), GetLoc("sStrengthR")); + normalMapContent = new GUIContent(GetLoc("sNormalMap"), GetLoc("sNormalRGB")); + noiseMaskContent = new GUIContent(GetLoc("sNoise"), GetLoc("sNoiseR")); + matcapContent = new GUIContent(GetLoc("sMatCap"), GetLoc("sTextureRGBA")); + gradationContent = new GUIContent(GetLoc("sGradation"), GetLoc("sTextureRGBA")); + gradSpeedContent = new GUIContent(GetLoc("sGradTexSpeed"), GetLoc("sTextureRGBA")); + smoothnessContent = new GUIContent(GetLoc("sSmoothness"), GetLoc("sSmoothnessR")); + metallicContent = new GUIContent(GetLoc("sMetallic"), GetLoc("sMetallicR")); + parallaxContent = new GUIContent(GetLoc("sParallax"), GetLoc("sParallaxR")); + audioLinkMaskContent = new GUIContent(GetLoc("sMask"), GetLoc("sAudioLinkMaskRGB")); + audioLinkMaskSpectrumContent = new GUIContent(GetLoc("sMask"), GetLoc("sAudioLinkMaskRGBSpectrum")); + customMaskContent = new GUIContent(GetLoc("sMask"), ""); + shadow1stColorRGBAContent = new GUIContent(GetLoc("sShadow1stColor"), GetLoc("sTextureRGBA")); + shadow2ndColorRGBAContent = new GUIContent(GetLoc("sShadow2ndColor"), GetLoc("sTextureRGBA")); + shadow3rdColorRGBAContent = new GUIContent(GetLoc("sShadow3rdColor"), GetLoc("sTextureRGBA")); + blurMaskRGBContent = new GUIContent(GetLoc("sBlurMask"), GetLoc("sBlurRGB")); + shadowAOMapContent = new GUIContent("AO Map", GetLoc("sBorderRGB")); + widthMaskContent = new GUIContent(GetLoc("sWidth"), GetLoc("sWidthR")); + lengthMaskContent = new GUIContent(GetLoc("sLengthMask"), GetLoc("sStrengthR")); + triMaskContent = new GUIContent(GetLoc("sTriMask"), GetLoc("sTriMaskRGB")); + cubemapContent = new GUIContent("Cubemap Fallback"); + audioLinkLocalMapContent = new GUIContent(GetLoc("sAudioLinkLocalMap")); + gradationMapContent = new GUIContent(GetLoc("sGradationMap")); + + } + + public static string GetDisplayLabel(MaterialProperty prop) + { + var labels = prop.displayName.Split('|').First().Split('+').Select(m=>GetLoc(m)).ToArray(); + if(Event.current.alt) labels[0] = prop.name; + return string.Join("", labels); + } + + public static string GetDisplayName(MaterialProperty prop) + { + var labels = prop.displayName.Split('|').Select( + n=>string.Join("",n.Split('+').Select(m=>GetLoc(m)).ToArray()) + ).ToArray(); + if(Event.current.alt) + { + if(labels[0].Contains("|")) labels[0] = prop.name + labels[0].Substring(labels[0].IndexOf("|")); + else labels[0] = prop.name; + } + return string.Join("|", labels); + } + + public static string GetDisplayName(string label) + { + return string.Join("|", + label.Split('|').Select( + n=>string.Join("",n.Split('+').Select(m=>GetLoc(m)).ToArray()) + ).ToArray() + ); + } + + [Obsolete("This may be deleted in the future.")] public static void ApplySettingTemp(){} + [Obsolete("This may be deleted in the future.")] public static void SaveSettingTemp(){} + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilLanguageManager.cs.meta b/Assets/External/lilToon/Editor/lilLanguageManager.cs.meta new file mode 100644 index 00000000..037a1ebe --- /dev/null +++ b/Assets/External/lilToon/Editor/lilLanguageManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1efa0081aac1a464fa60d26881d2d238 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilMaterialProperty.cs b/Assets/External/lilToon/Editor/lilMaterialProperty.cs new file mode 100644 index 00000000..a77dc267 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilMaterialProperty.cs @@ -0,0 +1,129 @@ +#if UNITY_EDITOR +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace lilToon +{ + internal class lilMaterialProperty + { + public MaterialProperty p; + public HashSet blocks; + public string propertyName; + public bool isTexture; + + public float floatValue + { + get { return p.floatValue; } + set { p.floatValue = value; } + } + + public Vector4 vectorValue + { + get { return p.vectorValue; } + set { p.vectorValue = value; } + } + + public Color colorValue + { + get { return p.colorValue; } + set { p.colorValue = value; } + } + + public Texture textureValue + { + get { return p.textureValue; } + set { p.textureValue = value; } + } + + // Other + public string name + { + get { return p.name; } + private set { } + } + + public string displayName + { + get { return p.displayName; } + private set { } + } + + public MaterialProperty.PropFlags flags + { + get { return p.flags; } + private set { } + } + + public bool hasMixedValue + { + get { return p.hasMixedValue; } + private set { } + } + + public Vector2 rangeLimits + { + get { return p.rangeLimits; } + private set { } + } + + public Object[] targets + { + get { return p.targets; } + private set { } + } + + public UnityEngine.Rendering.TextureDimension textureDimension + { + get { return p.textureDimension; } + private set { } + } + + public MaterialProperty.PropType type + { + get { return p.type; } + private set { } + } + + public void FindProperty(MaterialProperty[] props) + { + p = props.FirstOrDefault(prop => prop != null && prop.name == propertyName); + } + + public lilMaterialProperty() + { + p = null; + blocks = new HashSet(); + isTexture = false; + propertyName = null; + } + + public lilMaterialProperty(string name, params PropertyBlock[] inBrocks) + { + p = null; + blocks = inBrocks.ToHashSet(); + isTexture = false; + propertyName = name; + } + + public lilMaterialProperty(string name, bool isTex, params PropertyBlock[] inBrocks) + { + p = null; + blocks = inBrocks.ToHashSet(); + isTexture = isTex; + propertyName = name; + } + + public lilMaterialProperty(MaterialProperty prop) + { + p = prop; + } + + public static implicit operator MaterialProperty(lilMaterialProperty prop) + { + return prop.p; + } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilMaterialProperty.cs.meta b/Assets/External/lilToon/Editor/lilMaterialProperty.cs.meta new file mode 100644 index 00000000..ec0b1f2f --- /dev/null +++ b/Assets/External/lilToon/Editor/lilMaterialProperty.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08e11b7a56e70ee448b6abf5aca2e8f0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilMaterialUtils.cs b/Assets/External/lilToon/Editor/lilMaterialUtils.cs new file mode 100644 index 00000000..63e3e4cd --- /dev/null +++ b/Assets/External/lilToon/Editor/lilMaterialUtils.cs @@ -0,0 +1,729 @@ +#if !LILTOON_VRCSDK3_AVATARS && !LILTOON_VRCSDK3_WORLDS && VRC_SDK_VRCSDK3 + #if UDON + #define LILTOON_VRCSDK3_WORLDS + #else + #define LILTOON_VRCSDK3_AVATARS + #endif +#endif +#if UNITY_EDITOR +using System.Linq; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; + +namespace lilToon +{ + public class lilMaterialUtils + { + internal static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool istess, bool ismulti) + { + Undo.RecordObject(material, null); + int renderQueue = GetTrueRenderQueue(material); + RenderingMode rend = renderingMode; + lilRenderPipeline RP = lilRenderPipelineReader.GetRP(); + if(ismulti) + { + float tpmode = material.GetFloat("_TransparentMode"); + switch((int)tpmode) + { + case 1 : rend = RenderingMode.Cutout; break; + case 2 : rend = RenderingMode.Transparent; break; + case 3 : rend = RenderingMode.Refraction; break; + case 4 : rend = RenderingMode.Fur; break; + case 5 : rend = RenderingMode.FurCutout; break; + case 6 : rend = RenderingMode.Gem; break; + default : rend = RenderingMode.Opaque; break; + } + } + switch(rend) + { + case RenderingMode.Opaque: + if(islite) + { + if(isoutl) material.shader = lilShaderManager.ltslo; + else material.shader = lilShaderManager.ltsl; + } + else if(ismulti) + { + if(isoutl) material.shader = lilShaderManager.ltsmo; + else material.shader = lilShaderManager.ltsm; + material.SetOverrideTag("RenderType", ""); + material.renderQueue = -1; + } + else if(istess) + { + if(isoutl) material.shader = lilShaderManager.ltstesso; + else material.shader = lilShaderManager.ltstess; + } + else + { + if(isoutl) material.shader = lilShaderManager.ltso; + else material.shader = lilShaderManager.lts; + } + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_AlphaToMask", 0); + if(isoutl) + { + material.SetInt("_OutlineSrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_OutlineDstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_OutlineAlphaToMask", 0); + } + break; + case RenderingMode.Cutout: + if(islite) + { + if(isoutl) material.shader = lilShaderManager.ltslco; + else material.shader = lilShaderManager.ltslc; + } + else if(ismulti) + { + if(isoutl) material.shader = lilShaderManager.ltsmo; + else material.shader = lilShaderManager.ltsm; + material.SetOverrideTag("RenderType", "TransparentCutout"); + material.renderQueue = 2450; + } + else if(istess) + { + if(isoutl) material.shader = lilShaderManager.ltstessco; + else material.shader = lilShaderManager.ltstessc; + } + else + { + if(isoutl) material.shader = lilShaderManager.ltsco; + else material.shader = lilShaderManager.ltsc; + } + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_AlphaToMask", 1); + if(isoutl) + { + material.SetInt("_OutlineSrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_OutlineDstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_OutlineAlphaToMask", 1); + } + break; + case RenderingMode.Transparent: + if(ismulti) + { + if(isoutl) material.shader = lilShaderManager.ltsmo; + else material.shader = lilShaderManager.ltsm; + material.SetOverrideTag("RenderType", "TransparentCutout"); + material.renderQueue = RP == lilRenderPipeline.HDRP ? 3000 : 2460; + } + else + { + switch (transparentMode) + { + case TransparentMode.Normal: + if(islite) + { + if(isoutl) material.shader = lilShaderManager.ltslto; + else material.shader = lilShaderManager.ltslt; + } + else if(istess) + { + if(isoutl) material.shader = lilShaderManager.ltstessto; + else material.shader = lilShaderManager.ltstesst; + } + else + { + if(isoutl) material.shader = lilShaderManager.ltsto; + else material.shader = lilShaderManager.ltst; + } + break; + case TransparentMode.OnePass: + if(islite) + { + if(isoutl) material.shader = lilShaderManager.ltsloto; + else material.shader = lilShaderManager.ltslot; + } + else if(istess) + { + if(isoutl) material.shader = lilShaderManager.ltstessoto; + else material.shader = lilShaderManager.ltstessot; + } + else + { + if(isoutl) material.shader = lilShaderManager.ltsoto; + else material.shader = lilShaderManager.ltsot; + } + break; + case TransparentMode.TwoPass: + if(islite) + { + if(isoutl) material.shader = lilShaderManager.ltsltto; + else material.shader = lilShaderManager.ltsltt; + } + else if(istess) + { + if(isoutl) material.shader = lilShaderManager.ltstesstto; + else material.shader = lilShaderManager.ltstesstt; + } + else + { + if(isoutl) material.shader = lilShaderManager.ltstto; + else material.shader = lilShaderManager.ltstt; + } + break; + } + } + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_AlphaToMask", 0); + if(isoutl) + { + material.SetInt("_OutlineSrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha); + material.SetInt("_OutlineDstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_OutlineAlphaToMask", 0); + } + break; + case RenderingMode.Refraction: + if(ismulti) + { + material.shader = lilShaderManager.ltsmref; + material.SetOverrideTag("RenderType", ""); + material.renderQueue = -1; + } + else + { + material.shader = lilShaderManager.ltsref; + } + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_AlphaToMask", 0); + break; + case RenderingMode.RefractionBlur: + material.shader = lilShaderManager.ltsrefb; + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_AlphaToMask", 0); + break; + case RenderingMode.Fur: + if(ismulti) + { + material.shader = lilShaderManager.ltsmfur; + material.SetOverrideTag("RenderType", "TransparentCutout"); + material.renderQueue = 3000; + } + else + { + material.shader = lilShaderManager.ltsfur; + } + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_AlphaToMask", 0); + material.SetInt("_FurSrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha); + material.SetInt("_FurDstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_FurZWrite", 0); + material.SetInt("_FurAlphaToMask", 0); + break; + case RenderingMode.FurCutout: + if(ismulti) + { + material.shader = lilShaderManager.ltsmfur; + material.SetOverrideTag("RenderType", "TransparentCutout"); + material.renderQueue = 2450; + } + else + { + material.shader = lilShaderManager.ltsfurc; + } + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_AlphaToMask", 1); + material.SetInt("_FurSrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_FurDstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_FurZWrite", 1); + material.SetInt("_FurAlphaToMask", 1); + break; + case RenderingMode.FurTwoPass: + material.shader = lilShaderManager.ltsfurtwo; + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_AlphaToMask", 0); + material.SetInt("_FurSrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha); + material.SetInt("_FurDstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_FurZWrite", 0); + material.SetInt("_FurAlphaToMask", 0); + break; + case RenderingMode.Gem: + if(ismulti) + { + material.shader = lilShaderManager.ltsmgem; + material.SetOverrideTag("RenderType", ""); + material.renderQueue = -1; + } + else + { + material.shader = lilShaderManager.ltsgem; + } + material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_AlphaToMask", 0); + break; + } + if(!ismulti) material.renderQueue = renderQueue; + FixTransparentRenderQueue(material, renderingMode); + if(rend == RenderingMode.Gem) + { + material.SetInt("_Cull", 0); + material.SetInt("_ZWrite", 0); + } + else + { + material.SetInt("_ZWrite", 1); + } + if(transparentMode != TransparentMode.TwoPass) + { + material.SetInt("_ZTest", 4); + } + material.SetFloat("_OffsetFactor", 0.0f); + material.SetFloat("_OffsetUnits", 0.0f); + material.SetInt("_ColorMask", 15); + material.SetInt("_SrcBlendAlpha", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlendAlpha", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_BlendOp", (int)BlendOp.Add); + material.SetInt("_BlendOpAlpha", (int)BlendOp.Add); + material.SetInt("_SrcBlendFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_DstBlendFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_SrcBlendAlphaFA", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_DstBlendAlphaFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_BlendOpFA", (int)BlendOp.Max); + material.SetInt("_BlendOpAlphaFA", (int)BlendOp.Max); + if(isoutl) + { + material.SetInt("_OutlineCull", 1); + material.SetInt("_OutlineZWrite", 1); + material.SetInt("_OutlineZTest", 2); + material.SetFloat("_OutlineOffsetFactor", 0.0f); + material.SetFloat("_OutlineOffsetUnits", 0.0f); + material.SetInt("_OutlineColorMask", 15); + material.SetInt("_OutlineSrcBlendAlpha", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_OutlineDstBlendAlpha", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_OutlineBlendOp", (int)BlendOp.Add); + material.SetInt("_OutlineBlendOpAlpha", (int)BlendOp.Add); + material.SetInt("_OutlineSrcBlendFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_OutlineDstBlendFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_OutlineSrcBlendAlphaFA", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_OutlineDstBlendAlphaFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_OutlineBlendOpFA", (int)BlendOp.Max); + material.SetInt("_OutlineBlendOpAlphaFA", (int)BlendOp.Max); + } + if(renderingMode == RenderingMode.Fur || renderingMode == RenderingMode.FurCutout || renderingMode == RenderingMode.FurTwoPass) + { + material.SetInt("_FurZTest", 4); + material.SetFloat("_FurOffsetFactor", 0.0f); + material.SetFloat("_FurOffsetUnits", 0.0f); + material.SetInt("_FurColorMask", 15); + material.SetInt("_FurSrcBlendAlpha", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_FurDstBlendAlpha", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); + material.SetInt("_FurBlendOp", (int)BlendOp.Add); + material.SetInt("_FurBlendOpAlpha", (int)BlendOp.Add); + material.SetInt("_FurSrcBlendFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_FurDstBlendFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_FurSrcBlendAlphaFA", (int)UnityEngine.Rendering.BlendMode.Zero); + material.SetInt("_FurDstBlendAlphaFA", (int)UnityEngine.Rendering.BlendMode.One); + material.SetInt("_FurBlendOpFA", (int)BlendOp.Max); + material.SetInt("_FurBlendOpAlphaFA", (int)BlendOp.Max); + } + } + + public static bool CheckMainTextureName(string name) + { + return lilConstants.mainTexCheckWords.Any(word => !name.Contains(word)); + } + + private static void FixTransparentRenderQueue(Material material, RenderingMode renderingMode) + { + #if LILTOON_VRCSDK3_WORLDS + if( renderingMode == RenderingMode.Transparent || + renderingMode == RenderingMode.Refraction || + renderingMode == RenderingMode.RefractionBlur || + renderingMode == RenderingMode.Fur || + renderingMode == RenderingMode.FurTwoPass || + renderingMode == RenderingMode.Gem + ) + { + material.renderQueue = 3000; + } + #endif + } + + public static void SetupMultiMaterial(Material material) + { + int tpmode = 0; + if(material.HasProperty("_TransparentMode")) tpmode = (int)material.GetFloat("_TransparentMode"); + bool useShadow = IsFeatureOnFloat(material, "_UseShadow"); + bool useRimShade = IsFeatureOnFloat(material, "_UseRimShade"); + bool useDistanceFade = IsFeatureOnVectorZ(material, "_DistanceFade"); + bool useEmission = IsFeatureOnFloat(material, "_UseEmission"); + bool useEmission2nd = IsFeatureOnFloat(material, "_UseEmission2nd"); + bool useBumpMap = IsFeatureOnFloat(material, "_UseBumpMap"); + bool useBump2ndMap = IsFeatureOnFloat(material, "_UseBump2ndMap"); + bool useAnisotropy = IsFeatureOnFloat(material, "_UseAnisotropy"); + bool useMatCap = IsFeatureOnFloat(material, "_UseMatCap"); + bool useMatCap2nd = IsFeatureOnFloat(material, "_UseMatCap2nd"); + bool useMatCapCustomNormal = IsFeatureOnFloat(material, "_MatCapCustomNormal"); + bool useMatCap2ndCustomNormal = IsFeatureOnFloat(material, "_MatCap2ndCustomNormal"); + bool useRim = IsFeatureOnFloat(material, "_UseRim"); + bool useRimDir = IsFeatureOnFloat(material, "_RimDirStrength"); + bool useGlitter = IsFeatureOnFloat(material, "_UseGlitter"); + bool useAudioLink = IsFeatureOnFloat(material, "_UseAudioLink"); + bool audioLinkAsLocal = IsFeatureOnFloat(material, "_AudioLinkAsLocal"); + bool useDissolve = IsFeatureOnVectorX(material, "_DissolveParams"); + bool useMain2ndDissolve = IsFeatureOnVectorX(material, "_Main2ndDissolveParams"); + bool useMain3rdDissolve = IsFeatureOnVectorX(material, "_Main3rdDissolveParams"); + bool useMainTexHSVG = IsFeatureOnHSVG(material, "_MainTexHSVG"); + bool useMainGradation = IsFeatureOnFloat(material, "_MainGradationStrength"); + bool useMain2ndTex = IsFeatureOnFloat(material, "_UseMain2ndTex"); + bool useMain3rdTex = IsFeatureOnFloat(material, "_UseMain3rdTex"); + bool useBacklight = IsFeatureOnFloat(material, "_UseBacklight"); + bool useParallax = IsFeatureOnFloat(material, "_UseParallax"); + bool usePOM = IsFeatureOnFloat(material, "_UsePOM"); + bool useReflection = IsFeatureOnFloat(material, "_UseReflection"); + bool useAlphaMask = IsFeatureOnFloat(material, "_AlphaMaskMode"); + bool useMain2ndTexDecalAnimation = IsFeatureOnDecalAnimation(material, "_Main2ndTexDecalAnimation"); + bool useMain3rdTexDecalAnimation = IsFeatureOnDecalAnimation(material, "_Main3rdTexDecalAnimation"); + bool useEmissionBlendMask = IsFeatureOnTexture(material, "_EmissionBlendMask"); + bool useEmission2ndBlendMask = IsFeatureOnTexture(material, "_Emission2ndBlendMask"); + + bool isOutl = material.shader.name.Contains("Outline"); + bool isRefr = material.shader.name.Contains("Refraction"); + bool isFur = material.shader.name.Contains("Fur"); + bool isGem = material.shader.name.Contains("Gem"); + + SetShaderKeywords(material, "UNITY_UI_ALPHACLIP", tpmode == 1); + SetShaderKeywords(material, "UNITY_UI_CLIP_RECT", tpmode == 2 || tpmode == 4); + SetShaderKeywords(material, "ETC1_EXTERNAL_ALPHA", tpmode == 1 && material.GetFloat("_UseDither") == 1.0f); + material.SetShaderPassEnabled("ShadowCaster", material.GetFloat("_AsOverlay") == 0.0f); + material.SetShaderPassEnabled("DepthOnly", material.GetFloat("_AsOverlay") == 0.0f); + material.SetShaderPassEnabled("DepthNormals", material.GetFloat("_AsOverlay") == 0.0f); + material.SetShaderPassEnabled("DepthForwardOnly", material.GetFloat("_AsOverlay") == 0.0f); + material.SetShaderPassEnabled("MotionVectors", material.GetFloat("_AsOverlay") == 0.0f); + + if(isGem) + { + SetShaderKeywords(material, "_REQUIRE_UV2", false); + SetShaderKeywords(material, "AUTO_KEY_VALUE", false); + SetShaderKeywords(material, "_FADING_ON", false); + } + else + { + SetShaderKeywords(material, "_REQUIRE_UV2", useShadow); + SetShaderKeywords(material, "AUTO_KEY_VALUE", useRimShade); + SetShaderKeywords(material, "_FADING_ON", useDistanceFade); + } + + SetShaderKeywords(material, "_EMISSION", useEmission); + SetShaderKeywords(material, "GEOM_TYPE_BRANCH", useEmission2nd); + SetShaderKeywords(material, "_SUNDISK_SIMPLE", (useEmission && useEmissionBlendMask) || (useEmission2nd && useEmission2ndBlendMask)); + SetShaderKeywords(material, "_NORMALMAP", useBumpMap); + SetShaderKeywords(material, "EFFECT_BUMP", useBump2ndMap); + SetShaderKeywords(material, "SOURCE_GBUFFER", useAnisotropy); + SetShaderKeywords(material, "_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A", useMatCap); + SetShaderKeywords(material, "_SPECULARHIGHLIGHTS_OFF", useMatCap2nd); + SetShaderKeywords(material, "GEOM_TYPE_MESH", (useMatCap && useMatCapCustomNormal) || (useMatCap2nd && useMatCap2ndCustomNormal)); + SetShaderKeywords(material, "_METALLICGLOSSMAP", useRim); + SetShaderKeywords(material, "GEOM_TYPE_LEAF", useRim && useRimDir); + SetShaderKeywords(material, "_SPECGLOSSMAP", useGlitter); + SetShaderKeywords(material, "_MAPPING_6_FRAMES_LAYOUT", useAudioLink); + SetShaderKeywords(material, "_SUNDISK_HIGH_QUALITY", useAudioLink && audioLinkAsLocal); + SetShaderKeywords(material, "GEOM_TYPE_BRANCH_DETAIL", useDissolve); + + if(isGem) + { + SetShaderKeywords(material, "EFFECT_HUE_VARIATION", false); + SetShaderKeywords(material, "_COLORADDSUBDIFF_ON", false); + SetShaderKeywords(material, "_COLORCOLOR_ON", false); + SetShaderKeywords(material, "_SUNDISK_NONE", false); + SetShaderKeywords(material, "GEOM_TYPE_FROND", false); + SetShaderKeywords(material, "_COLOROVERLAY_ON", false); + SetShaderKeywords(material, "ANTI_FLICKER", false); + SetShaderKeywords(material, "_PARALLAXMAP", false); + SetShaderKeywords(material, "PIXELSNAP_ON", false); + SetShaderKeywords(material, "_GLOSSYREFLECTIONS_OFF", false); + } + else + { + SetShaderKeywords(material, "EFFECT_HUE_VARIATION", useMainTexHSVG || useMainGradation); + SetShaderKeywords(material, "_COLORADDSUBDIFF_ON", useMain2ndTex); + SetShaderKeywords(material, "_COLORCOLOR_ON", useMain3rdTex); + SetShaderKeywords(material, "_SUNDISK_NONE", (useMain2ndTex && useMain2ndTexDecalAnimation) || (useMain3rdTex && useMain3rdTexDecalAnimation)); + SetShaderKeywords(material, "GEOM_TYPE_FROND", (useMain2ndTex && useMain2ndDissolve) || (useMain3rdTex && useMain3rdDissolve)); + SetShaderKeywords(material, "_COLOROVERLAY_ON", tpmode != 0 && useAlphaMask); + SetShaderKeywords(material, "ANTI_FLICKER", useBacklight); + SetShaderKeywords(material, "_PARALLAXMAP", useParallax); + SetShaderKeywords(material, "PIXELSNAP_ON", useParallax && usePOM); + SetShaderKeywords(material, "_GLOSSYREFLECTIONS_OFF", useReflection); + } + + if(isRefr || isFur || isGem) + { + SetShaderKeywords(material, "_DETAIL_MULX2", false); + } + else + { + SetShaderKeywords(material, "_DETAIL_MULX2", isOutl && material.GetVector("_OutlineTexHSVG") != lilConstants.defaultHSVG); + } + + // Remove old keywords + material.SetShaderPassEnabled("SRPDEFAULTUNLIT", true); + SetShaderKeywords(material, "BILLBOARD_FACE_CAMERA_POS", false); + } + + public static void SetupMultiMaterial(Material[] materials, AnimationClip[] clips) + { + var ms = materials.Where(m => m.shader.name.Contains("Multi")).ToArray(); + foreach(var binding in clips.SelectMany(c => AnimationUtility.GetCurveBindings(c)).ToArray()) + { + string propname = binding.propertyName; + if(string.IsNullOrEmpty(propname) || !propname.Contains("material.")) continue; + + void Set(string name, string keyword) + { + if(propname.Contains(name)) + foreach(var m in ms) + { + m.EnableKeyword(keyword); + EditorUtility.SetDirty(m); + } + } + Set("_RimDirStrength", "GEOM_TYPE_LEAF"); + Set("_MainTexHSVG", "EFFECT_HUE_VARIATION"); + Set("_MainGradationStrength", "EFFECT_HUE_VARIATION"); + } + AssetDatabase.SaveAssets(); + } + + private static bool IsFeatureOnFloat(Material material, string propname) + { + if(material.HasProperty(propname)) return material.GetFloat(propname) != 0.0f; + return false; + } + + private static bool IsFeatureOnVectorZ(Material material, string propname) + { + if(material.HasProperty(propname)) return material.GetVector(propname).z != 0.0f; + return false; + } + + private static bool IsFeatureOnVectorX(Material material, string propname) + { + if(material.HasProperty(propname)) return material.GetVector(propname).x != 0.0f; + return false; + } + + private static bool IsFeatureOnHSVG(Material material, string propname) + { + if(material.HasProperty(propname)) return material.GetVector(propname) != lilConstants.defaultHSVG; + return false; + } + + private static bool IsFeatureOnDecalAnimation(Material material, string propname) + { + if(material.HasProperty(propname)) return material.GetVector(propname) != lilConstants.defaultDecalAnim; + return false; + } + + private static bool IsFeatureOnTexture(Material material, string propname) + { + if(material.HasProperty(propname)) return material.GetTexture(propname) != null; + return false; + } + + private static void SetShaderKeywords(Material material, string keyword, bool enable) + { + if(enable) material.EnableKeyword(keyword); + else material.DisableKeyword(keyword); + } + + public static void RemoveUnusedTexture(Material material, params string[] animatedProps) + { + if(!material.shader.name.Contains("lilToon")) return; + RemoveUnusedTexture(material, material.shader.name.Contains("Lite"), animatedProps); + } + + public static void RemoveUnusedTexture(Material material, bool islite, params string[] animatedProps) + { + RemoveUnusedProperties(material); + RemoveUnusedTextureOnly(material, islite, animatedProps); + } + + public static void RemoveUnusedTextureOnly(Material material, bool islite, params string[] animatedProps) + { + if(islite) + { + if(IsPropZero(material, "_UseShadow", animatedProps)) + { + material.SetTexture("_ShadowColorTex", null); + material.SetTexture("_Shadow2ndColorTex", null); + } + if(IsPropZero(material, "_UseEmission", animatedProps)) + { + material.SetTexture("_EmissionMap", null); + } + if(IsPropZero(material, "_UseMatCap", animatedProps)) + { + material.SetTexture("_MatCapTex", null); + } + } + else + { + if(IsPropZero(material, "_MainGradationStrength", animatedProps)) material.SetTexture("_MainGradationTex", null); + if(IsPropZero(material, "_UseMain2ndTex", animatedProps)) + { + material.SetTexture("_Main2ndTex", null); + material.SetTexture("_Main2ndBlendMask", null); + material.SetTexture("_Main2ndDissolveMask", null); + material.SetTexture("_Main2ndDissolveNoiseMask", null); + } + if(IsPropZero(material, "_UseMain3rdTex", animatedProps)) + { + material.SetTexture("_Main3rdTex", null); + material.SetTexture("_Main3rdBlendMask", null); + material.SetTexture("_Main3rdDissolveMask", null); + material.SetTexture("_Main3rdDissolveNoiseMask", null); + } + if(IsPropZero(material, "_UseShadow", animatedProps)) + { + material.SetTexture("_ShadowBlurMask", null); + material.SetTexture("_ShadowBorderMask", null); + material.SetTexture("_ShadowStrengthMask", null); + material.SetTexture("_ShadowColorTex", null); + material.SetTexture("_Shadow2ndColorTex", null); + material.SetTexture("_Shadow3rdColorTex", null); + } + if(IsPropZero(material, "_UseRimShade", animatedProps)) + { + material.SetTexture("_RimShadeMask", null); + } + if(IsPropZero(material, "_UseEmission", animatedProps)) + { + material.SetTexture("_EmissionMap", null); + material.SetTexture("_EmissionBlendMask", null); + material.SetTexture("_EmissionGradTex", null); + } + if(IsPropZero(material, "_UseEmission2nd", animatedProps)) + { + material.SetTexture("_Emission2ndMap", null); + material.SetTexture("_Emission2ndBlendMask", null); + material.SetTexture("_Emission2ndGradTex", null); + } + if(IsPropZero(material, "_UseBumpMap", animatedProps)) material.SetTexture("_BumpMap", null); + if(IsPropZero(material, "_UseBump2ndMap", animatedProps)) + { + material.SetTexture("_Bump2ndMap", null); + material.SetTexture("_Bump2ndScaleMask", null); + } + if(IsPropZero(material, "_UseAnisotropy", animatedProps)) + { + material.SetTexture("_AnisotropyTangentMap", null); + material.SetTexture("_AnisotropyScaleMask", null); + material.SetTexture("_AnisotropyShiftNoiseMask", null); + } + if(IsPropZero(material, "_UseReflection", animatedProps)) + { + material.SetTexture("_SmoothnessTex", null); + material.SetTexture("_MetallicGlossMap", null); + material.SetTexture("_ReflectionColorTex", null); + material.SetTexture("_ReflectionCubeTex", null); + } + if(IsPropZero(material, "_UseMatCap", animatedProps)) + { + material.SetTexture("_MatCapTex", null); + material.SetTexture("_MatCapBlendMask", null); + material.SetTexture("_MatCapBumpMap", null); + } + if(IsPropZero(material, "_UseMatCap2nd", animatedProps)) + { + material.SetTexture("_MatCap2ndTex", null); + material.SetTexture("_MatCap2ndBlendMask", null); + material.SetTexture("_MatCap2ndBumpMap", null); + } + if(!material.shader.name.Contains("Outline")) + { + material.SetTexture("_OutlineTex", null); + material.SetTexture("_OutlineWidthMask", null); + material.SetTexture("_OutlineVectorTex", null); + } + if(!material.shader.name.Contains("Fur")) + { + material.SetTexture("_FurVectorTex", null); + material.SetTexture("_FurLengthMask", null); + material.SetTexture("_FurNoiseMask", null); + material.SetTexture("_FurMask", null); + } + if(IsPropZero(material, "_UseRim", animatedProps)) material.SetTexture("_RimColorTex", null); + if(IsPropZero(material, "_UseGlitter", animatedProps)) material.SetTexture("_GlitterColorTex", null); + if(IsPropZero(material, "_UseParallax", animatedProps)) material.SetTexture("_ParallaxMap", null); + if(IsPropZero(material, "_UseAudioLink", animatedProps) || material.GetFloat("_AudioLinkUVMode") != 3.0f || animatedProps.Contains("_AudioLinkUVMode")) material.SetTexture("_AudioLinkMask", null); + if(IsPropZero(material, "_UseAudioLink", animatedProps) || IsPropZero(material, "_AudioLinkAsLocal", animatedProps)) material.SetTexture("_AudioLinkLocalMap", null); + } + } + + private static bool IsPropZero(Material material, string name, string[] animatedProps) + { + return !material.HasProperty(name) || material.GetFloat(name) == 0.0f && !animatedProps.Contains(name); + } + + public static void RemoveShaderKeywords(Material material) + { + foreach(var keyword in material.shaderKeywords) + { + material.DisableKeyword(keyword); + } + } + + private static void RemoveUnusedProperties(Material material) + { + // https://light11.hatenadiary.com/entry/2018/12/04/224253 + var so = new SerializedObject(material); + so.Update(); + var savedProps = so.FindProperty("m_SavedProperties"); + + var texs = savedProps.FindPropertyRelative("m_TexEnvs"); + DeleteUnused(ref texs, material); + + var floats = savedProps.FindPropertyRelative("m_Floats"); + DeleteUnused(ref floats, material); + + var colors = savedProps.FindPropertyRelative("m_Colors"); + DeleteUnused(ref colors, material); + + so.ApplyModifiedProperties(); + } + + private static void DeleteUnused(ref SerializedProperty props, Material material) + { + for(int i = props.arraySize - 1; i >= 0; i--) + { + if(!material.HasProperty(props.GetArrayElementAtIndex(i).FindPropertyRelative("first").stringValue)) + { + props.DeleteArrayElementAtIndex(i); + } + } + } + + public static int GetTrueRenderQueue(Material material) + { + var so = new SerializedObject(material); + return so.FindProperty("m_CustomRenderQueue").intValue; + } + + public static bool CheckShaderIslilToon(Material material) + { + if(material == null) return false; + return CheckShaderIslilToon(material.shader); + } + + public static bool CheckShaderIslilToon(Shader shader) + { + if(shader == null) return false; + if(shader.name.Contains("lilToon") || shader.name.Contains("lts_pass")) return true; + string shaderPath = AssetDatabase.GetAssetPath(shader); + return !string.IsNullOrEmpty(shaderPath) && shaderPath.Contains(".lilcontainer"); + } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilMaterialUtils.cs.meta b/Assets/External/lilToon/Editor/lilMaterialUtils.cs.meta new file mode 100644 index 00000000..30726274 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilMaterialUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f8fa439eb71a9340b0ea2cd90947b89 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilOptimizer.cs b/Assets/External/lilToon/Editor/lilOptimizer.cs new file mode 100644 index 00000000..f2efe116 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilOptimizer.cs @@ -0,0 +1,366 @@ +#if UNITY_EDITOR +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace lilToon +{ + public class lilOptimizer + { + private const int TYPE_OFFSET = 8; + + internal static void OptimizeInputHLSL(Material[] materials, AnimationClip[] clips) + { + try + { + var dicT = new Dictionary(); + var dicD = new Dictionary(); + var dicF = new Dictionary(); + var dicC = new Dictionary(); + CheckMaterials(materials, dicT, dicD, dicF, dicC); + CheckAnimationClips(clips, dicT, dicD, dicF, dicC); + RewriteInputHLSL(dicT, dicD, dicF, dicC); + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] OptimizeInputHLSL() failed"); + } + } + + internal static string GetOptimizedText(Material[] materials, AnimationClip[] clips) + { + try + { + var dicT = new Dictionary(); + var dicD = new Dictionary(); + var dicF = new Dictionary(); + var dicC = new Dictionary(); + CheckMaterials(materials, dicT, dicD, dicF, dicC); + CheckAnimationClips(clips, dicT, dicD, dicF, dicC); + return RewriteInputHLSLText(dicT, dicD, dicF, dicC); + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] OptimizeInputHLSL() failed"); + return e.ToString(); + } + } + + private static void CheckMaterials(IEnumerable materials, Dictionary dicT, Dictionary dicD, Dictionary dicF, Dictionary dicC) + { + foreach(var m in materials) CheckMaterial(m, dicT, dicD, dicF, dicC); + } + + private static void CheckMaterial(Material material, Dictionary dicT, Dictionary dicD, Dictionary dicF, Dictionary dicC) + { + if(material == null || !CheckShaderIslilToon(material.shader)) return; + var so = new SerializedObject(material); + var savedProps = so.FindProperty("m_SavedProperties"); + + var texs = savedProps.FindPropertyRelative("m_TexEnvs"); + Check(dicT, dicD, texs, material); + + var floats = savedProps.FindPropertyRelative("m_Floats"); + Check(dicF, floats, material); + + var colors = savedProps.FindPropertyRelative("m_Colors"); + Check(dicC, colors, material); + } + + private static void CheckAnimationClips(IEnumerable clips, Dictionary dicT, Dictionary dicD, Dictionary dicF, Dictionary dicC) + { + foreach(var c in clips) CheckAnimationClip(c, dicT, dicD, dicF, dicC); + } + + private static void CheckAnimationClip(AnimationClip clip, Dictionary dicT, Dictionary dicD, Dictionary dicF, Dictionary dicC) + { + if(clip == null) return; + CheckMaterials(AnimationUtility.GetObjectReferenceCurveBindings(clip).SelectMany(b => AnimationUtility.GetObjectReferenceCurve(clip, b)).Select(f => f.value as Material).Distinct(), dicT, dicD, dicF, dicC); + + foreach(var propname in AnimationUtility.GetCurveBindings(clip).Select(b => b.propertyName).Where(n => !string.IsNullOrEmpty(n) && n.Contains("material."))) + { + if(propname.Contains("_ST.")) + { + string name = propname.Substring(9, propname.Length - 14); + dicD[name] = new STProp(){isVariable = true}; + } + else if(propname.EndsWith(".r") || propname.EndsWith(".g") || propname.EndsWith(".b") || propname.EndsWith(".a") || propname.EndsWith(".x") || propname.EndsWith(".y") || propname.EndsWith(".z") || propname.EndsWith(".w")) + { + string name = propname.Substring(9, propname.Length - 11); + dicC[name] = new ColorProp(){isVariable = true}; + } + else + { + string name = propname.Substring(9, propname.Length - 9); + dicF[name] = new FloatProp(){isVariable = true}; + } + } + } + + private static void Check(Dictionary dic, Dictionary dicD, SerializedProperty props, Material material) + { + for(int i = 0; i < props.arraySize; i++) + { + var prop = props.GetArrayElementAtIndex(i); + string name = prop.FindPropertyRelative("first").stringValue; + if(!material.HasProperty(name)) continue; + var prop2 = prop.FindPropertyRelative("second"); + Object tex = prop2.FindPropertyRelative("m_Texture").objectReferenceValue; + Vector2 scale = prop2.FindPropertyRelative("m_Scale").vector2Value; + Vector2 offset = prop2.FindPropertyRelative("m_Offset").vector2Value; + + if(dic.ContainsKey(name)) + { + if(!dic[name].isVariable && dic[name].t != tex) dic[name] = new TexProp(){isVariable = true}; + } + else + { + dic[name] = new TexProp(){ + isVariable = false, + t = tex + }; + } + + if(dicD.ContainsKey(name)) + { + if(!dicD[name].isVariable) + { + var v = dicD[name]; + if(v.s != scale || v.o != offset) dicD[name] = new STProp(){isVariable = true}; + } + } + else + { + dicD[name] = new STProp(){ + isVariable = false, + s = scale, + o = offset + }; + } + } + } + + private static void Check(Dictionary dic, SerializedProperty props, Material material) + { + for(int i = 0; i < props.arraySize; i++) + { + var prop = props.GetArrayElementAtIndex(i); + string name = prop.FindPropertyRelative("first").stringValue; + if(!material.HasProperty(name) || dic.ContainsKey(name) && dic[name].isVariable) continue; + float fl = prop.FindPropertyRelative("second").floatValue; + if(dic.ContainsKey(name)) + { + if(dic[name].f != fl) dic[name] = new FloatProp(){isVariable = true}; + continue; + } + dic[name] = new FloatProp(){ + isVariable = false, + f = fl + }; + } + } + + private static void Check(Dictionary dic, SerializedProperty props, Material material) + { + for(int i = 0; i < props.arraySize; i++) + { + var prop = props.GetArrayElementAtIndex(i); + string name = prop.FindPropertyRelative("first").stringValue; + if(!material.HasProperty(name) || dic.ContainsKey(name) && dic[name].isVariable) continue; + Color color = prop.FindPropertyRelative("second").colorValue; + if(dic.ContainsKey(name)) + { + if(dic[name].c != color) dic[name] = new ColorProp(){isVariable = true}; + continue; + } + dic[name] = new ColorProp(){ + isVariable = false, + c = color + }; + } + } + + private static void RewriteInputHLSL(Dictionary dicT, Dictionary dicD, Dictionary dicF, Dictionary dicC) + { + string optHLSL = RewriteInputHLSLText(dicT, dicD, dicF, dicC); + string pathOpt = AssetDatabase.GUIDToAssetPath("571051a232e4af44a98389bda858df27"); + var sw = new StreamWriter(pathOpt, false); + sw.Write(optHLSL); + sw.Close(); + } + + private static string RewriteInputHLSLText(Dictionary dicT, Dictionary dicD, Dictionary dicF, Dictionary dicC) + { + if(dicT.Count == 0 && dicD.Count == 0 && dicF.Count == 0 && dicC.Count == 0) return null; + string pathBase = AssetDatabase.GUIDToAssetPath("8ff7f7d9c86e1154fb3aac5a8a8681bb"); + string pathOpt = AssetDatabase.GUIDToAssetPath("571051a232e4af44a98389bda858df27"); + if(string.IsNullOrEmpty(pathBase) || string.IsNullOrEmpty(pathOpt) || !File.Exists(pathBase) || !File.Exists(pathOpt)) return null; + var shader = Shader.Find("Hidden/ltspass_proponly"); + var sb = new StringBuilder(); + var sr = new StreamReader(pathBase); + string line; + while((line = sr.ReadLine()) != null) + { + int indEND = line.IndexOf(";"); + if(indEND <= 0) + { + sb.AppendLine(line); + continue; + } + + int indF4 = line.IndexOf("float4 "); + int indST = line.IndexOf("_ST;"); + int indF = line.IndexOf("float "); + int indI = line.IndexOf("uint "); + int indB = line.IndexOf("lilBool "); + if(indF4 >= 0) + { + indF4 += TYPE_OFFSET; + string name = line.Substring(indF4, indEND - indF4); + if(indST >= 0) + { + // Texture + string texname = name.Substring(0,name.Length - 3); + if(dicD.ContainsKey(texname) && !dicD[texname].isVariable) + { + var v = dicD[texname]; + sb.AppendLine(GetIndent(indF4 - 8) + "#define " + name + " float4(" + LilF2S(v.s.x) + "," + LilF2S(v.s.y) + "," + LilF2S(v.o.x) + "," + LilF2S(v.o.y) + ")"); + continue; + } + } + else if(dicC.ContainsKey(name) && !dicC[name].isVariable) + { + var v = dicC[name]; + Color c = ShouldLinear(shader, name) ? v.c.linear : v.c; + sb.AppendLine(GetIndent(indF4 - 8) + "#define " + name + " float4(" + LilF2S(c.r) + "," + LilF2S(c.g) + "," + LilF2S(c.b) + "," + LilF2S(c.a) + ")"); + + if(name == "_Color" && (v.c.r + v.c.g + v.c.b <= 0.001f)) sb.AppendLine(GetIndent(indF4 - 8) + "#define sampler_MainTex lil_sampler_linear_repeat_"); + continue; + } + } + else if(indF >= 0) + { + // Float + indF += TYPE_OFFSET; + string name = line.Substring(indF, indEND - indF); + if(dicF.ContainsKey(name) && !dicF[name].isVariable) + { + float f = dicF[name].f; + f = ShouldLinear(shader, name) ? Mathf.GammaToLinearSpace(f) : f; + sb.AppendLine(GetIndent(indF - 8) + "#define " + name + " (" + LilF2S(f) + ")"); + continue; + } + } + else if(indI >= 0) + { + // Int + indI += TYPE_OFFSET; + string name = line.Substring(indI, indEND - indI); + if(dicF.ContainsKey(name) && !dicF[name].isVariable && name != "_AlphaMaskMode") + { + sb.AppendLine(GetIndent(indI - 8) + "#define " + name + " (" + (uint)dicF[name].f + ")"); + continue; + } + } + else if(indB >= 0) + { + // Bool + indB += TYPE_OFFSET; + string name = line.Substring(indB, indEND - indB); + if(dicF.ContainsKey(name) && !dicF[name].isVariable) + { + sb.AppendLine(GetIndent(indB - 8) + "#define " + name + " (" + (uint)dicF[name].f + ")"); + continue; + } + } + sb.AppendLine(line); + } + sr.Close(); + + sb.Replace("\r\n", "\r"); + sb.Replace("\n", "\r"); + sb.Replace("\r", "\r\n"); + return sb.ToString(); + } + + private static bool ShouldLinear(Shader shader, string name) + { + if(PlayerSettings.colorSpace != ColorSpace.Linear) return false; + #if UNITY_2019_3_OR_NEWER + int id = shader.FindPropertyIndex(name); + if(id == -1) return false; + var flag = shader.GetPropertyFlags(id); + var type = shader.GetPropertyType(id); + if(type == UnityEngine.Rendering.ShaderPropertyType.Color) + { + return flag != UnityEngine.Rendering.ShaderPropertyFlags.HDR; + } + return flag == UnityEngine.Rendering.ShaderPropertyFlags.Gamma; + #else + //int id = shader.PropertyToID(name); + return false; + #endif + } + + internal static void ResetInputHLSL() + { + string pathBase = AssetDatabase.GUIDToAssetPath("8ff7f7d9c86e1154fb3aac5a8a8681bb"); + string pathOpt = AssetDatabase.GUIDToAssetPath("571051a232e4af44a98389bda858df27"); + if(string.IsNullOrEmpty(pathBase) || string.IsNullOrEmpty(pathOpt) || !File.Exists(pathBase) || !File.Exists(pathOpt)) return; + var sw = new StreamWriter(pathOpt, false); + var sr = new StreamReader(pathBase); + sw.Write(sr.ReadToEnd()); + sw.Close(); + sr.Close(); + } + + private static string GetIndent(int indent) + { + return new string(' ', indent); + } + + private static bool CheckShaderIslilToon(Shader shader) + { + if(shader == null) return false; + if(shader.name.Contains("lilToon")) return true; + string shaderPath = AssetDatabase.GetAssetPath(shader); + return !string.IsNullOrEmpty(shaderPath) && shaderPath.Contains(".lilcontainer"); + } + + private static string LilF2S(float f){ return f.ToString(CultureInfo.InvariantCulture); } + + private struct TexProp + { + public bool isVariable; + public Object t; + } + + private struct STProp + { + public bool isVariable; + public Vector2 s; + public Vector2 o; + } + + private struct FloatProp + { + public bool isVariable; + public float f; + } + + private struct ColorProp + { + public bool isVariable; + public Color c; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilOptimizer.cs.meta b/Assets/External/lilToon/Editor/lilOptimizer.cs.meta new file mode 100644 index 00000000..03416525 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilOptimizer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba359247b3512914c963370174c3e0d4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilPropertyNameChecker.cs b/Assets/External/lilToon/Editor/lilPropertyNameChecker.cs new file mode 100644 index 00000000..86580c05 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilPropertyNameChecker.cs @@ -0,0 +1,335 @@ +namespace lilToon +{ + public class lilPropertyNameChecker + { + private static bool IsRenderingPropertyInternal(string name) + { + return + name.Contains("Cull") || + name.Contains("Src") || + name.Contains("Dst") || + name.Contains("BlendOp") || + name.Contains("ZClip") || + name.Contains("ZWrite") || + name.Contains("ZTest") || + name.Contains("Stencil") || + name.Contains("OffsetFactor") || + name.Contains("OffsetUnits") || + name.Contains("ColorMask") || + name.Contains("AlphaToMask"); + } + + private static bool IsStencilPropertyInternal(string name) + { + return name.Contains("Stencil"); + } + + public static bool IsDummyProperty(string name) + { + bool res = false; + res = res || name == "_BaseColor"; + res = res || name == "_BaseMap"; + res = res || name == "_BaseColorMap"; + res = res || name == "_lilToonVersion"; + res = res || name.Contains("_egc"); + res = res || name.Contains("_ega"); + res = res || name.Contains("_e2gc"); + res = res || name.Contains("_e2ga"); + return res; + } + + public static bool IsBaseProperty(string name) + { + bool res = false; + res = res || name == "_Invisible"; + res = res || name == "_Cutoff"; + res = res || name == "_FlipNormal"; + res = res || name == "_BackfaceForceShadow"; + res = res || name == "_BackfaceColor"; + res = res || name == "_FakeShadowVector"; + res = res || name == "_TriMask"; + res = res || name == "_TransparentMode"; + res = res || name == "_UseClippingCanceller"; + res = res || name == "_AsOverlay"; + res = res || name == "_AAStrength"; + res = res || name == "_UseDither"; + res = res || name.Contains("_Dither"); + return res; + } + + public static bool IsLightingProperty(string name) + { + bool res = false; + res = res || name == "_LightMinLimit"; + res = res || name == "_LightMaxLimit"; + res = res || name == "_MonochromeLighting"; + res = res || name == "_AsUnlit"; + res = res || name == "_VertexLightStrength"; + res = res || name == "_BeforeExposureLimit"; + res = res || name == "_AlphaBoostFA"; + res = res || name == "_lilDirectionalLightStrength"; + res = res || name == "_LightDirectionOverride"; + return res; + } + + public static bool IsUVProperty(string name) + { + bool res = false; + res = res || name == "_MainTex"; + res = res || name == "_MainTex_ScrollRotate"; + res = res || name == "_ShiftBackfaceUV"; + return res; + } + + public static bool IsMainProperty(string name) + { + bool res = false; + res = res || name == "_Color"; + res = res || name.Contains("_Main") && !name.Contains("_ScrollRotate") && !name.Contains("2nd") && !name.Contains("3rd"); + return res; + } + + public static bool IsMain2ndProperty(string name) + { + bool res = false; + res = res || name == "_UseMain2ndTex"; + res = res || name == "_Color2nd"; + res = res || name.Contains("_Main2nd"); + return res; + } + + public static bool IsMain3rdProperty(string name) + { + bool res = false; + res = res || name == "_UseMain3rdTex"; + res = res || name == "_Color3rd"; + res = res || name.Contains("_Main3rd"); + return res; + } + + public static bool IsAlphaMaskProperty(string name) + { + bool res = false; + res = res || name.Contains("_AlphaMask"); + return res; + } + + public static bool IsShadowProperty(string name) + { + bool res = false; + res = res || name == "_UseShadow"; + res = res || name == "_lilShadowCasterBias"; + res = res || name.Contains("_Shadow"); + return res; + } + + public static bool IsRimShadeProperty(string name) + { + bool res = false; + res = res || name == "_UseRimShade"; + res = res || name.Contains("_RimShade"); + return res; + } + + public static bool IsEmissionProperty(string name) + { + bool res = false; + res = res || name == "_UseEmission"; + res = res || name.Contains("_Emission") && !name.Contains("2nd"); + return res; + } + + public static bool IsEmission2ndProperty(string name) + { + bool res = false; + res = res || name == "_UseEmission2nd"; + res = res || name.Contains("_Emission2nd"); + return res; + } + + public static bool IsNormalMapProperty(string name) + { + bool res = false; + res = res || name == "_UseBumpMap"; + res = res || name == "_BumpMap"; + res = res || name == "_BumpScale"; + return res; + } + + public static bool IsNormalMap2ndProperty(string name) + { + bool res = false; + res = res || name == "_UseBump2ndMap"; + res = res || name == "_Bump2ndMap"; + res = res || name == "_Bump2ndScale"; + res = res || name == "_Bump2ndScaleMask"; + return res; + } + + public static bool IsAnisotropyProperty(string name) + { + bool res = false; + res = res || name == "_UseAnisotropy"; + res = res || name.Contains("_Anisotropy"); + return res; + } + + public static bool IsBacklightProperty(string name) + { + bool res = false; + res = res || name == "_UseBacklight"; + res = res || name.Contains("_Backlight"); + return res; + } + + public static bool IsReflectionProperty(string name) + { + bool res = false; + res = res || name == "_UseReflection"; + res = res || name == "_Smoothness"; + res = res || name == "_SmoothnessTex"; + res = res || name == "_Metallic"; + res = res || name == "_MetallicGlossMap"; + res = res || name == "_Reflectance"; + res = res || name == "_GSAAStrength"; + res = res || name == "_ApplySpecular"; + res = res || name == "_ApplySpecularFA"; + res = res || name == "_ApplyReflection"; + res = res || name.Contains("_Specular"); + res = res || name.Contains("_Reflection"); + return res; + } + + public static bool IsMatCapProperty(string name) + { + bool res = false; + res = res || name == "_UseMatCap"; + res = res || name.Contains("_MatCap") && !name.Contains("2nd"); + return res; + } + + public static bool IsMatCap2ndProperty(string name) + { + bool res = false; + res = res || name == "_UseMatCap2nd"; + res = res || name.Contains("_MatCap2nd"); + return res; + } + + public static bool IsRimProperty(string name) + { + bool res = false; + res = res || name == "_UseRim"; + res = res || name.Contains("_Rim"); + return res; + } + + public static bool IsGlitterProperty(string name) + { + bool res = false; + res = res || name == "_UseGlitter"; + res = res || name.Contains("_Glitter"); + return res; + } + + public static bool IsParallaxProperty(string name) + { + bool res = false; + res = res || name == "_UseParallax"; + res = res || name == "_UsePOM"; + res = res || name.Contains("_Parallax"); + return res; + } + + public static bool IsDistanceFadeProperty(string name) + { + bool res = false; + res = res || name.Contains("_DistanceFade"); + return res; + } + + public static bool IsAudioLinkProperty(string name) + { + bool res = false; + res = res || name == "_UseAudioLink"; + res = res || name.Contains("_AudioLink"); + return res; + } + + public static bool IsDissolveProperty(string name) + { + bool res = false; + res = res || name.Contains("_Dissolve"); + return res; + } + + public static bool IsRefractionProperty(string name) + { + bool res = false; + res = res || name.Contains("_Refraction"); + return res; + } + + public static bool IsGemProperty(string name) + { + bool res = false; + res = res || name.Contains("_Gem"); + res = res || IsReflectionProperty(name); + res = res || IsRefractionProperty(name); + return res; + } + + public static bool IsTessellationProperty(string name) + { + bool res = false; + res = res || name.Contains("_Tess"); + return res; + } + + public static bool IsOutlineProperty(string name) + { + bool res = false; + res = res || name == "_UseOutline"; + res = res || name.Contains("_Outline") && !IsRenderingPropertyInternal(name) && !IsStencilPropertyInternal(name); + return res; + } + + public static bool IsFurProperty(string name) + { + bool res = false; + res = res || name == "_VertexColor2FurVector"; + res = res || name.Contains("_Fur") && !IsRenderingPropertyInternal(name) && !IsStencilPropertyInternal(name); + return res; + } + + public static bool IsStencilProperty(string name) + { + bool res = false; + res = res || IsStencilPropertyInternal(name); + return res; + } + + public static bool IsRenderingProperty(string name) + { + bool res = false; + res = res || !name.Contains("_Outline") && !name.Contains("_Fur") && IsRenderingPropertyInternal(name); + res = res || name == "_SubpassCutoff"; + res = res || name == "_lilShadowCasterBias"; + return res; + } + + public static bool IsOutlineRenderingProperty(string name) + { + bool res = false; + res = res || name.Contains("_Outline") && IsRenderingPropertyInternal(name); + return res; + } + + public static bool IsFurRenderingProperty(string name) + { + bool res = false; + res = res || name.Contains("_Fur") && IsRenderingPropertyInternal(name); + return res; + } + } +} \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilPropertyNameChecker.cs.meta b/Assets/External/lilToon/Editor/lilPropertyNameChecker.cs.meta new file mode 100644 index 00000000..3de2c198 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilPropertyNameChecker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef60dad7e5cdbfb4cb0c49c788dde24e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilRenderPipelineReader.cs b/Assets/External/lilToon/Editor/lilRenderPipelineReader.cs new file mode 100644 index 00000000..cfa258f2 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilRenderPipelineReader.cs @@ -0,0 +1,150 @@ +#if UNITY_EDITOR +using System.IO; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; + +namespace lilToon +{ + public class lilRenderPipelineReader + { + public static lilRenderPipeline GetRP() + { + // Render Pipeline + // BRP : null + // LWRP : LightweightPipeline.LightweightRenderPipelineAsset + // URP : Universal.UniversalRenderPipelineAsset + // HDRP : HighDefinition.HDRenderPipelineAsset + string renderPipelineName = ""; + #if UNITY_2019_3_OR_NEWER + if(GraphicsSettings.currentRenderPipeline != null) + { + renderPipelineName = GraphicsSettings.currentRenderPipeline.ToString(); + } + #else + if(GraphicsSettings.renderPipelineAsset != null) + { + renderPipelineName = GraphicsSettings.renderPipelineAsset.ToString(); + } + #endif + if(renderPipelineName.Contains("Universal")) + { + return lilRenderPipeline.URP; + } + else if(renderPipelineName.Contains("Lightweight")) + { + return lilRenderPipeline.LWRP; + } + else if(renderPipelineName.Contains("HDRenderPipeline")) + { + return lilRenderPipeline.HDRP; + } + return lilRenderPipeline.BRP; + } + + public static PackageVersionInfos GetRPInfos() + { + string renderPipelineName = ""; + #if UNITY_2019_3_OR_NEWER + if(GraphicsSettings.currentRenderPipeline != null) + { + renderPipelineName = GraphicsSettings.currentRenderPipeline.ToString(); + } + #else + if(GraphicsSettings.renderPipelineAsset != null) + { + renderPipelineName = GraphicsSettings.renderPipelineAsset.ToString(); + } + #endif + if(renderPipelineName.Contains("Universal")) + { + return GetURPVersion(); + } + else if(renderPipelineName.Contains("Lightweight")) + { + return GetLWRPVersion(); + } + else if(renderPipelineName.Contains("HDRenderPipeline")) + { + return GetHDRPVersion(); + } + return new PackageVersionInfos() + { + RP = lilRenderPipeline.BRP, + Major = 0, + Minor = 0, + Patch = 0 + }; + } + + private static PackageVersionInfos GetURPVersion() + { + string path = AssetDatabase.GUIDToAssetPath("30648b8d550465f4bb77f1e1afd0b37d"); + var package = JsonUtility.FromJson(File.ReadAllText(path)); + string guid = + package.displayName.Contains("SLZ") ? + "753d1ac2429a21a44ac5f937cbbb409f" : // Core + "30648b8d550465f4bb77f1e1afd0b37d"; // URP + var version = ReadVersion(guid); + version.RP = lilRenderPipeline.URP; + return version; + } + + private static PackageVersionInfos GetLWRPVersion() + { + var version = ReadVersion("30648b8d550465f4bb77f1e1afd0b37d"); + version.RP = lilRenderPipeline.LWRP; + return version; + } + + private static PackageVersionInfos GetHDRPVersion() + { + var version = ReadVersion("6f54db4299717fc4ca37866c6afa0905"); + version.RP = lilRenderPipeline.HDRP; + return version; + } + + private static PackageVersionInfos ReadVersion(string guid) + { + string version = ""; + string path = AssetDatabase.GUIDToAssetPath(guid); + if(!string.IsNullOrEmpty(path)) + { + var package = JsonUtility.FromJson(File.ReadAllText(path)); + version = package.version; + } + + PackageVersionInfos infos; + infos.RP = lilRenderPipeline.BRP; + if(string.IsNullOrEmpty(version)) + { + infos.Major = 0; + infos.Minor = 0; + infos.Patch = 0; + } + else + { + var parser = new SemVerParser(version); + infos.Major = parser.major; + infos.Minor = parser.minor; + infos.Patch = parser.patch; + } + return infos; + } + + private class PackageInfos + { + public string displayName = ""; + public string version = ""; + } + } + + public struct PackageVersionInfos + { + public lilRenderPipeline RP; + public int Major; + public int Minor; + public int Patch; + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilRenderPipelineReader.cs.meta b/Assets/External/lilToon/Editor/lilRenderPipelineReader.cs.meta new file mode 100644 index 00000000..b59010f4 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilRenderPipelineReader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3fcbf3d5c2bc8f942a20ef548c18ea86 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilSemVerParser.cs b/Assets/External/lilToon/Editor/lilSemVerParser.cs new file mode 100644 index 00000000..823e4527 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilSemVerParser.cs @@ -0,0 +1,132 @@ +#if UNITY_EDITOR +using System; +using System.Text.RegularExpressions; + +namespace lilToon +{ + public class SemVerParser { + public int major; + public int minor; + public int patch; + public string prerelease; + public string build; + + public SemVerParser(string versionString, bool isForced) { + // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string + var pattern = @"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"; + var pattern2 = @"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)"; + var regex = new Regex(pattern); + var regex2 = new Regex(pattern2); + var match = regex.Match(versionString); + var match2 = regex2.Match(versionString); + if (match.Success) { + major = int.Parse(match.Groups[1].Value); + minor = int.Parse(match.Groups[2].Value); + patch = int.Parse(match.Groups[3].Value); + prerelease = match.Groups[4].Success ? match.Groups[4].Value : null; + build = match.Groups[5].Success ? match.Groups[5].Value : null; + } else if (match2.Success) { + major = int.Parse(match2.Groups[1].Value); + minor = int.Parse(match2.Groups[2].Value); + patch = int.Parse(match2.Groups[3].Value); + prerelease = null; + build = null; + } else if(isForced) { + major = 999999; + minor = 999999; + patch = 999999; + } else { + throw new ArgumentException("Invalid semver string: " + versionString); + } + } + + public SemVerParser(string versionString) { + // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string + var pattern = @"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"; + var regex = new Regex(pattern); + var match = regex.Match(versionString); + if (match.Success) { + major = int.Parse(match.Groups[1].Value); + minor = int.Parse(match.Groups[2].Value); + patch = int.Parse(match.Groups[3].Value); + prerelease = match.Groups[4].Success ? match.Groups[4].Value : null; + build = match.Groups[5].Success ? match.Groups[5].Value : null; + } else { + throw new ArgumentException("Invalid semver string: " + versionString); + } + } + + public int CompareTo(SemVerParser other) { + if (other == null) { + return 1; + } + + if (major != other.major) { + return major.CompareTo(other.major); + } + + if (minor != other.minor) { + return minor.CompareTo(other.minor); + } + + if (patch != other.patch) { + return patch.CompareTo(other.patch); + } + + if (prerelease == null && other.prerelease != null) { + return 1; + } else if (prerelease != null && other.prerelease == null) { + return -1; + } else if (prerelease != null && other.prerelease != null) { + int cmp = string.Compare(prerelease, other.prerelease); + if (cmp != 0) { + return cmp; + } + } + + if (build == null && other.build != null) { + return 1; + } else if (build != null && other.build == null) { + return -1; + } else if (build != null && other.build != null) { + int cmp = string.Compare(build, other.build); + if (cmp != 0) { + return cmp; + } + } + + return 0; + } + + public static bool operator ==(SemVerParser v1, SemVerParser v2) { + if (ReferenceEquals(v1, v2)) { + return true; + } + if (ReferenceEquals(v1, null) || ReferenceEquals(v2, null)) { + return false; + } + return v1.CompareTo(v2) == 0; + } + public static bool operator !=(SemVerParser v1, SemVerParser v2) { return !(v1 == v2); } + public static bool operator < (SemVerParser v1, SemVerParser v2) { return v1.CompareTo(v2) < 0; } + public static bool operator <=(SemVerParser v1, SemVerParser v2) { return v1.CompareTo(v2) <= 0; } + public static bool operator > (SemVerParser v1, SemVerParser v2) { return v1.CompareTo(v2) > 0; } + public static bool operator >=(SemVerParser v1, SemVerParser v2) { return v1.CompareTo(v2) >= 0; } + + public override bool Equals(object obj) + { + return base.Equals(obj); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override string ToString() + { + return base.ToString(); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilSemVerParser.cs.meta b/Assets/External/lilToon/Editor/lilSemVerParser.cs.meta new file mode 100644 index 00000000..8402ef04 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilSemVerParser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dd55f8a842290cd4193118c389862e57 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilShaderAPI.cs b/Assets/External/lilToon/Editor/lilShaderAPI.cs new file mode 100644 index 00000000..ff440b93 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilShaderAPI.cs @@ -0,0 +1,32 @@ +#if UNITY_EDITOR +using UnityEngine; +using UnityEngine.Rendering; + +namespace lilToon +{ + public class lilShaderAPI + { + public static bool IsTextureLimitedAPI() + { + return CurrentAPITextureLimit() <= 32; + } + + public static int CurrentAPITextureLimit() + { + switch(SystemInfo.graphicsDeviceType) + { + #if !UNITY_2023_1_OR_NEWER + case GraphicsDeviceType.OpenGLES2: + return 32; + #endif + case GraphicsDeviceType.OpenGLES3: + return 32; + case GraphicsDeviceType.OpenGLCore: + return 32; + default : + return 128; + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilShaderAPI.cs.meta b/Assets/External/lilToon/Editor/lilShaderAPI.cs.meta new file mode 100644 index 00000000..5d13c274 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilShaderAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 64ff19b6b10348547b41f334ec1a1b9e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilShaderContainerImporter.cs b/Assets/External/lilToon/Editor/lilShaderContainerImporter.cs new file mode 100644 index 00000000..d042bddd --- /dev/null +++ b/Assets/External/lilToon/Editor/lilShaderContainerImporter.cs @@ -0,0 +1,1654 @@ +#if UNITY_EDITOR +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using UnityEngine; +using UnityEditor; +using System.Reflection; +using System.Text.RegularExpressions; +using System.Linq; +#if UNITY_2020_2_OR_NEWER +using UnityEditor.AssetImporters; +#else + using UnityEditor.Experimental.AssetImporters; +#endif + +namespace lilToon +{ + #if LILTOON_DISABLE_ASSET_MODIFICATION == false + #if UNITY_2019_4_OR_NEWER + [ScriptedImporter(0, "lilcontainer")] + public class lilShaderContainerImporter : ScriptedImporter + { + public override void OnImportAsset(AssetImportContext ctx) + { + var source = lilShaderContainer.UnpackContainer(ctx.assetPath, ctx); + #if UNITY_2019_4_0 || UNITY_2019_4_1 || UNITY_2019_4_2 || UNITY_2019_4_3 || UNITY_2019_4_4 || UNITY_2019_4_5 || UNITY_2019_4_6 || UNITY_2019_4_7 || UNITY_2019_4_8 || UNITY_2019_4_9 || UNITY_2019_4_10 + var shader = ShaderUtil.CreateShaderAsset(source, false); + #else + var shader = ShaderUtil.CreateShaderAsset(ctx, source, false); + #endif + + var text = new TextAsset(source); + text.name = "Shader Source"; + text.hideFlags = HideFlags.HideInHierarchy; + + ctx.AddObjectToAsset("main obj", shader); + ctx.AddObjectToAsset("Shader Source", text); + ctx.SetMainObject(shader); + } + } + + [CustomEditor(typeof(lilShaderContainerImporter))] + public class lilShaderContainerImporterEditor : ScriptedImporterEditor + { + public override void OnInspectorGUI() + { + if(GUILayout.Button("Export Shader")) + { + string assetPath = AssetDatabase.GetAssetPath(target); + string shaderText = lilShaderContainer.UnpackContainer(assetPath); + string exportPath = EditorUtility.SaveFilePanel("Export Shader", Path.GetDirectoryName(assetPath), Path.GetFileNameWithoutExtension(assetPath), "shader"); + if(string.IsNullOrEmpty(exportPath)) return; + File.WriteAllText(exportPath, shaderText); + } + ApplyRevertGUI(); + } + } + + public class lilShaderContainerAssetPostprocessor : AssetPostprocessor + { + private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) + { + foreach(var path in importedAssets.Where(p => p.EndsWith("lilcontainer", StringComparison.InvariantCultureIgnoreCase))) + { + var mainobj = AssetDatabase.LoadMainAssetAtPath(path); + if(mainobj is Shader) ShaderUtil.RegisterShader((Shader)mainobj); + + foreach(var obj in AssetDatabase.LoadAllAssetRepresentationsAtPath(path).Where(o => o is Shader)) + { + ShaderUtil.RegisterShader((Shader)obj); + } + } + } + } + #endif + #endif //LILTOON_DISABLE_ASSET_MODIFICATION + + public class lilShaderContainer + { + private const string MULTI_COMPILE_FORWARD = "#pragma lil_multi_compile_forward"; + private const string MULTI_COMPILE_FORWARDADD = "#pragma lil_multi_compile_forwardadd"; + private const string MULTI_COMPILE_SHADOWCASTER = "#pragma lil_multi_compile_shadowcaster"; + private const string MULTI_COMPILE_DEPTHONLY = "#pragma lil_multi_compile_depthonly"; + private const string MULTI_COMPILE_DEPTHNORMALS = "#pragma lil_multi_compile_depthnormals"; + private const string MULTI_COMPILE_MOTIONVECTORS = "#pragma lil_multi_compile_motionvectors"; + private const string MULTI_COMPILE_SCENESELECTION = "#pragma lil_multi_compile_sceneselection"; + private const string MULTI_COMPILE_META = "#pragma lil_multi_compile_meta"; + private const string MULTI_COMPILE_INSTANCING = "#pragma multi_compile_instancing"; + private const string SKIP_VARIANTS_SHADOWS = "#pragma lil_skip_variants_shadows"; + private const string SKIP_VARIANTS_LIGHTMAPS = "#pragma lil_skip_variants_lightmaps"; + private const string SKIP_VARIANTS_DECALS = "#pragma lil_skip_variants_decals"; + private const string SKIP_VARIANTS_ADDLIGHT = "#pragma lil_skip_variants_addlight"; + private const string SKIP_VARIANTS_ADDLIGHTSHADOWS = "#pragma lil_skip_variants_addlightshadows"; + private const string SKIP_VARIANTS_PROBEVOLUMES = "#pragma lil_skip_variants_probevolumes"; + private const string SKIP_VARIANTS_AO = "#pragma lil_skip_variants_ao"; + private const string SKIP_VARIANTS_LIGHTLISTS = "#pragma lil_skip_variants_lightlists"; + private const string SKIP_VARIANTS_REFLECTIONS = "#pragma lil_skip_variants_reflections"; + private const string SKIP_VARIANTS_BASE_SHADOWS = "#pragma lil_skip_variants_base_shadows"; + private const string SKIP_VARIANTS_OUTLINE_SHADOWS = "#pragma lil_skip_variants_outline_shadows"; + + private const string INCLUDE_BRP = "Includes/lil_pipeline_brp.hlsl\""; + private const string INCLUDE_LWRP = "Includes/lil_pipeline_lwrp.hlsl\""; + private const string INCLUDE_URP = "Includes/lil_pipeline_urp.hlsl\""; + private const string INCLUDE_HDRP = "Includes/lil_pipeline_hdrp.hlsl\""; + + private const string LIL_SHADER_NAME = "*LIL_SHADER_NAME*"; + private const string LIL_EDITOR_NAME = "*LIL_EDITOR_NAME*"; + private const string LIL_SUBSHADER_INSERT = "*LIL_SUBSHADER_INSERT*"; + private const string LIL_SUBSHADER_INSERT_POST = "*LIL_SUBSHADER_INSERT_POST*"; + private const string LIL_SHADER_SETTING = "*LIL_SHADER_SETTING*"; + private const string LIL_SRP_VERSION = "*LIL_SRP_VERSION*"; + private const string LIL_PASS_SHADER_NAME = "*LIL_PASS_SHADER_NAME*"; + private const string LIL_SUBSHADER_TAGS = "*LIL_SUBSHADER_TAGS*"; + private const string LIL_DOTS_SM_TAGS = "*LIL_DOTS_SM_TAGS*"; + private const string LIL_DOTS_SM_4_5 = "*LIL_DOTS_SM_4_5*"; + private const string LIL_DOTS_SM_4_5_OR_3_5 = "*LIL_DOTS_SM_4_5_OR_3_5*"; + private const string LIL_INSERT_PASS_PRE = "*LIL_INSERT_PASS_PRE*"; + private const string LIL_INSERT_PASS_POST = "*LIL_INSERT_PASS_POST*"; + private const string LIL_INSERT_USEPASS_PRE = "*LIL_INSERT_USEPASS_PRE*"; + private const string LIL_INSERT_USEPASS_POST = "*LIL_INSERT_USEPASS_POST*"; + private const string LIL_LIGHTMODE_FORWARD_0 = "*LIL_LIGHTMODE_FORWARD_0*"; + private const string LIL_LIGHTMODE_FORWARD_1 = "*LIL_LIGHTMODE_FORWARD_1*"; + private const string LIL_LIGHTMODE_FORWARD_2 = "*LIL_LIGHTMODE_FORWARD_2*"; + + private const string LIL_LIGHTMODE_BRP_FORWARD_0 = "ForwardBase"; + private const string LIL_LIGHTMODE_BRP_FORWARD_1 = "ForwardBase"; + private const string LIL_LIGHTMODE_BRP_FORWARD_2 = "ForwardBase"; + + private const string LIL_LIGHTMODE_HDRP_FORWARD_0 = "ForwardOnly"; + private const string LIL_LIGHTMODE_HDRP_FORWARD_1 = "Forward"; + private const string LIL_LIGHTMODE_HDRP_FORWARD_2 = "SRPDefaultUnlit"; + + private const string LIL_LIGHTMODE_LWRP_FORWARD_0 = "LightweightForward"; + private const string LIL_LIGHTMODE_LWRP_FORWARD_1 = "SRPDefaultUnlit"; + private const string LIL_LIGHTMODE_LWRP_FORWARD_2 = "SRPDefaultUnlit"; + + private const string LIL_LIGHTMODE_URP_7_FORWARD_0 = "UniversalForward"; + private const string LIL_LIGHTMODE_URP_7_FORWARD_1 = "LightweightForward"; + private const string LIL_LIGHTMODE_URP_7_FORWARD_2 = "SRPDefaultUnlit"; + + private const string LIL_LIGHTMODE_URP_8_FORWARD_0 = "SRPDefaultUnlit"; + private const string LIL_LIGHTMODE_URP_8_FORWARD_1 = "UniversalForward"; + private const string LIL_LIGHTMODE_URP_8_FORWARD_2 = "LightweightForward"; + + private const string LIL_LIGHTMODE_URP_9_FORWARD_0 = "SRPDefaultUnlit"; + private const string LIL_LIGHTMODE_URP_9_FORWARD_1 = "UniversalForward"; + private const string LIL_LIGHTMODE_URP_9_FORWARD_2 = "UniversalForwardOnly"; + + private const string csdShaderNameTag = "ShaderName"; + private const string csdEditorNameTag = "EditorName"; + private const string csdReplaceTag = "Replace"; + private const string csdInsertPassPreTag = "InsertPassPre"; + private const string csdInsertPassPostTag = "InsertPassPost"; + private const string csdInsertUsePassPreTag = "InsertUsePassPre"; + private const string csdInsertUsePassPostTag = "InsertUsePassPost"; + + private static Dictionary replaces = new Dictionary(); + + private const string customShaderDataFile = "lilCustomShaderDatas.lilblock"; + private const string customShaderResourcesFolderGUID = "1acd4e79a7d2c6c44aa8b97a1e33f20b"; // "Assets/lilToon/CustomShaderResources" + private static string GetCustomShaderResourcesFolderPath() { return AssetDatabase.GUIDToAssetPath(customShaderResourcesFolderGUID); } + + private static string passShaderName = ""; + private static string subShaderTags = ""; + private static string insertText = ""; + private static string insertPostText = ""; + private static string shaderSettingText = ""; + private static string resourcesFolderPath = ""; + private static string assetFolderPath = ""; + private static string shaderLibsPath = ""; + private static string assetName = ""; + private static string shaderName = ""; + private static string editorName = ""; + private static string origShaderName = ""; + private static bool isOrigShaderNameLoaded = false; + private static bool useBaseShadow = false; + private static bool useOutlineShadow = false; + + private static string insertPassPre = ""; + private static string insertPassPost = ""; + private static string insertUsePassPre = ""; + private static string insertUsePassPost = ""; + + private static string insertUsePassReference = ""; + + private static PackageVersionInfos version = new PackageVersionInfos(); + private static int indent = 12; + + public static string UnpackContainer(string assetPath, AssetImportContext ctx, bool doOptimize) + { + useBaseShadow = false; + useOutlineShadow = false; + passShaderName = ""; + subShaderTags = ""; + insertText = ""; + insertPostText = ""; + resourcesFolderPath = GetCustomShaderResourcesFolderPath() + "/"; + assetFolderPath = Path.GetDirectoryName(assetPath) + "/"; + shaderLibsPath = lilDirectoryManager.GetShaderFolderPath() + "/Includes"; + assetName = Path.GetFileName(assetPath); + shaderSettingText = BuildShaderSettingString(false, ref useBaseShadow, ref useOutlineShadow).Replace(Environment.NewLine, Environment.NewLine + " "); + shaderName = ""; + editorName = ""; + origShaderName = ""; + insertPassPre = ""; + insertPassPost = ""; + insertUsePassPre = ""; + insertUsePassPost = ""; + insertUsePassReference = File.ReadAllText( + GetCustomShaderResourcesFolderPath() + "/Misc/ReferenceUVs.lilblock" + ); + isOrigShaderNameLoaded = false; + replaces = new Dictionary(); + + StringBuilder sb; + + version = lilRenderPipelineReader.GetRPInfos(); + + switch(version.RP) + { + case lilRenderPipeline.BRP: + sb = ReadContainerFile(assetPath, "BRP", ctx, doOptimize); + ReplaceMultiCompiles(ref sb, version, indent, false); + RewriteForwardAdd(ref sb); + RewriteForwardAddShadow(ref sb); + break; + case lilRenderPipeline.LWRP: + sb = ReadContainerFile(assetPath, "LWRP", ctx, doOptimize); + ReplaceMultiCompiles(ref sb, version, indent, false); + break; + case lilRenderPipeline.URP: + sb = ReadContainerFile(assetPath, "URP", ctx, doOptimize); + break; + case lilRenderPipeline.HDRP: + sb = ReadContainerFile(assetPath, "HDRP", ctx, doOptimize); + ReplaceMultiCompiles(ref sb, version, indent, false); + break; + default: + sb = ReadContainerFile(assetPath, "BRP", ctx, doOptimize); + ReplaceMultiCompiles(ref sb, version, indent, false); + break; + } + + ReadDataFile(ctx); + ReplaceMultiCompiles(ref insertPassPre, version, indent, false); + ReplaceMultiCompiles(ref insertPassPost, version, indent, false); + ReplaceMultiCompiles(ref insertUsePassPre, version, indent, false); + ReplaceMultiCompiles(ref insertUsePassPost, version, indent, false); + insertUsePassPost += insertUsePassReference; + + sb.Replace(LIL_INSERT_PASS_PRE, insertPassPre); + sb.Replace(LIL_INSERT_PASS_POST, insertPassPost); + sb.Replace(LIL_INSERT_USEPASS_PRE, insertUsePassPre); + sb.Replace(LIL_INSERT_USEPASS_POST, insertUsePassPost); + + if(ctx != null) sb.Replace("\"Includes", "\"" + shaderLibsPath); + sb.Replace(LIL_SUBSHADER_INSERT, insertText); + sb.Replace(LIL_SUBSHADER_INSERT_POST, insertPostText); + sb.Replace(LIL_SHADER_SETTING, shaderSettingText); + if(version.RP != lilRenderPipeline.BRP && version.Major > 0) + { + sb.Replace( + LIL_SRP_VERSION, + "#define LIL_SRP_VERSION_MAJOR " + version.Major + Environment.NewLine + + " #define LIL_SRP_VERSION_MINOR " + version.Minor + Environment.NewLine + + " #define LIL_SRP_VERSION_PATCH " + version.Patch + Environment.NewLine + ); + } + else + { + sb.Replace(LIL_SRP_VERSION, ""); + } + sb.Replace(LIL_PASS_SHADER_NAME, passShaderName); + sb.Replace(LIL_SUBSHADER_TAGS, subShaderTags); + + sb.Replace(LIL_SHADER_NAME, shaderName); + sb.Replace(LIL_EDITOR_NAME, editorName); + + if(useBaseShadow) sb.Replace(SKIP_VARIANTS_BASE_SHADOWS, ""); + else sb.Replace(SKIP_VARIANTS_BASE_SHADOWS, SKIP_VARIANTS_SHADOWS); + + if(useOutlineShadow) sb.Replace(SKIP_VARIANTS_OUTLINE_SHADOWS, ""); + else sb.Replace(SKIP_VARIANTS_OUTLINE_SHADOWS, SKIP_VARIANTS_SHADOWS); + + sb.Replace(SKIP_VARIANTS_SHADOWS, GetSkipVariantsShadows()); + sb.Replace(SKIP_VARIANTS_LIGHTMAPS, GetSkipVariantsLightmaps()); + sb.Replace(SKIP_VARIANTS_DECALS, GetSkipVariantsDecals()); + sb.Replace(SKIP_VARIANTS_ADDLIGHTSHADOWS, GetSkipVariantsAddLightShadows()); + sb.Replace(SKIP_VARIANTS_ADDLIGHT, GetSkipVariantsAddLight()); + sb.Replace(SKIP_VARIANTS_PROBEVOLUMES, GetSkipVariantsProbeVolumes()); + sb.Replace(SKIP_VARIANTS_AO, GetSkipVariantsAO()); + sb.Replace(SKIP_VARIANTS_LIGHTLISTS, GetSkipVariantsLightLists()); + sb.Replace(SKIP_VARIANTS_REFLECTIONS, GetSkipVariantsReflections()); + + sb.Replace("(\"Version\", Int) = 0", "(\"Version\", Int) = " + lilConstants.currentVersionValue.ToString()); + + LightModeOverride(ref sb, "FORWARD", GetStringField("mainLightModeName")); + LightModeOverride(ref sb, "FORWARD_OUTLINE", GetStringField("outlineLightModeName")); + LightModeOverride(ref sb, "FORWARD_BACK", GetStringField("preLightModeName")); + LightModeOverride(ref sb, "FORWARD_FUR", GetStringField("furLightModeName")); + LightModeOverride(ref sb, "FORWARD_FUR_PRE", GetStringField("furPreLightModeName")); + LightModeOverride(ref sb, "FORWARD_PRE", GetStringField("gemPreLightModeName")); + + switch(version.RP) + { + case lilRenderPipeline.BRP: + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_BRP_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_BRP_FORWARD_1); + sb.Replace(LIL_LIGHTMODE_FORWARD_2, LIL_LIGHTMODE_BRP_FORWARD_2); + break; + case lilRenderPipeline.LWRP: + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_LWRP_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_LWRP_FORWARD_1); + sb.Replace(LIL_LIGHTMODE_FORWARD_2, LIL_LIGHTMODE_LWRP_FORWARD_2); + break; + case lilRenderPipeline.URP: + if(version.Major == 8) + { + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_URP_8_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_URP_8_FORWARD_1); + sb.Replace(LIL_LIGHTMODE_FORWARD_2, LIL_LIGHTMODE_URP_8_FORWARD_2); + } + else if(version.Major == 7) + { + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_URP_7_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_URP_7_FORWARD_1); + sb.Replace(LIL_LIGHTMODE_FORWARD_2, LIL_LIGHTMODE_URP_7_FORWARD_2); + } + else + { + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_URP_9_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_URP_9_FORWARD_1); + sb.Replace(LIL_LIGHTMODE_FORWARD_2, LIL_LIGHTMODE_URP_9_FORWARD_2); + } + break; + case lilRenderPipeline.HDRP: + if(sb.ToString().Contains(LIL_LIGHTMODE_FORWARD_2)) + { + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_HDRP_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_HDRP_FORWARD_1); + sb.Replace(LIL_LIGHTMODE_FORWARD_2, LIL_LIGHTMODE_HDRP_FORWARD_2); + } + else + { + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_HDRP_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_HDRP_FORWARD_2); + } + sb.Replace("\"RenderType\" = \"Opaque\"", "\"RenderType\" = \"HDLitShader\""); + sb.Replace("\"RenderType\" = \"Transparent\"", "\"RenderType\" = \"HDLitShader\""); + sb.Replace("\"RenderType\" = \"TransparentCutout\"", "\"RenderType\" = \"HDLitShader\""); + sb.Replace("\"Queue\" = \"AlphaTest+10\"", "\"Queue\" = \"Transparent\""); + sb.Replace("\"Queue\" = \"AlphaTest+55\"", "\"Queue\" = \"Transparent\""); + sb.Replace("\"Queue\" = \"Transparent-100\"", "\"Queue\" = \"Transparent\""); + break; + default: + sb.Replace(LIL_LIGHTMODE_FORWARD_0, LIL_LIGHTMODE_BRP_FORWARD_0); + sb.Replace(LIL_LIGHTMODE_FORWARD_1, LIL_LIGHTMODE_BRP_FORWARD_1); + sb.Replace(LIL_LIGHTMODE_FORWARD_2, LIL_LIGHTMODE_BRP_FORWARD_2); + break; + } + + if(assetName.Contains("ltspass_tess_")) + { + sb.Replace( + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2" + ); + } + + if((assetName.Contains("lts_fur") && !assetName.Contains("cutout")) || assetName.Contains("trans") || assetName.Contains("overlay")) + { + sb.Replace( + "(\"Alpha Cutoff\", Range(-0.001,1.001)) = 0.5", + "(\"Alpha Cutoff\", Range(-0.001,1.001)) = 0.001" + ); + } + + foreach(var replace in replaces) + { + sb.Replace(FixNewlineCode(replace.Key), FixNewlineCode(replace.Value)); + } + + FixIncludeForOldUnity(ref sb); + + if( + doOptimize && + !assetName.Contains("ltsmulti") && + !assetName.Contains("ltspass_lite") && + !assetName.Contains("ltsl") && + !assetName.Contains("fakeshadow") && + !string.IsNullOrEmpty(lilEditorParameters.instance.modifiedShaders) + ) + { + string pathOpt = AssetDatabase.GUIDToAssetPath("571051a232e4af44a98389bda858df27"); + if(!string.IsNullOrEmpty(pathOpt)) + { + StringBuilder sbInput = new StringBuilder(); + sbInput.AppendLine(""); + sbInput.AppendLine(" CBUFFER_START(UnityPerMaterial)"); + sbInput.Append (" #include \""); + sbInput.Append (pathOpt); + sbInput.AppendLine("\""); + sbInput.AppendLine(" #if defined(LIL_CUSTOM_PROPERTIES)"); + sbInput.AppendLine(" LIL_CUSTOM_PROPERTIES"); + sbInput.AppendLine(" #endif"); + sbInput.Append(" CBUFFER_END"); + string inputText = sbInput.ToString(); + sb.Replace(INCLUDE_BRP , INCLUDE_BRP + inputText); + sb.Replace(INCLUDE_LWRP, INCLUDE_LWRP + inputText); + sb.Replace(INCLUDE_URP , INCLUDE_URP + inputText); + sb.Replace(INCLUDE_HDRP, INCLUDE_HDRP + inputText); + } + } + + if( + !assetName.Contains("ltspass") && + GetBoolField("LIL_OPTIMIZE_DEFFERED", false) + ) + { + sb.Replace("/SHADOW_CASTER_OUTLINE", "/SHADOW_CASTER"); + } + + #if !UNITY_2019_4_OR_NEWER + sb.Replace("shader_feature_local", "shader_feature"); + #endif + + sb.Replace("\r\n", "\r"); + sb.Replace("\n", "\r"); + sb.Replace("\r", "\r\n"); + + sb.Replace("\r\n \r\n", "\r\n"); + sb.Replace("\r\n \r\n", "\r\n"); + sb.Replace("\r\n \r\n", "\r\n"); + + AddHLSLDependency(assetFolderPath, ctx); + + return sb.ToString(); + } + + public static string UnpackContainer(string assetPath, AssetImportContext ctx = null) + { + bool doOptimize = !string.IsNullOrEmpty(lilEditorParameters.instance.modifiedShaders); + return UnpackContainer(assetPath, ctx, doOptimize); + } + + private static void ReadDataFile(AssetImportContext ctx) + { + string path = assetFolderPath + customShaderDataFile; + + if(!File.Exists(path)) + { + Debug.LogWarning("[" + assetName + "] " + "File not found: " + path); + return; + } + AddDependency(ctx, path); + var sr = new StreamReader(path); + string line; + while((line = sr.ReadLine()) != null) + { + if(line.Contains(csdShaderNameTag)) + { + shaderName = GetTags(line); + origShaderName = origShaderName.Replace(LIL_SHADER_NAME, shaderName); + continue; + } + if(line.Contains(csdEditorNameTag)) + { + editorName = GetTags(line); + continue; + } + if(line.Contains(csdReplaceTag)) + { + GetReplaces(line); + continue; + } + if(line.Contains("Insert")) + { + GetInsert(line, ctx); + continue; + } + } + + sr.Close(); + } + + private static string GetTags(string line) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + return line.Substring(first, second - first); + } + + private static void GetReplaces(string line) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + int third = line.IndexOf('"', second + 1) + 1; + int fourth = line.IndexOf('"', third); + int fifth = line.IndexOf('"', fourth + 1) + 1; + if(fifth > 1) + { + int sixth = line.IndexOf('"', fifth); + string name = line.Substring(first, second - first); + if(name.StartsWith("!")) + { + if(origShaderName.Contains(name.Substring(1))) + { + return; + } + } + else if(!origShaderName.Contains(name)) + { + return; + } + string from = line.Substring(third, fourth - third); + string to = line.Substring(fifth, sixth - fifth); + replaces[from] = to; + } + else + { + string from = line.Substring(first, second - first); + string to = line.Substring(third, fourth - third); + replaces[from] = to; + } + } + + private static void GetInsert(string line, AssetImportContext ctx) + { + string rpname = "BRP"; + if(version.RP == lilRenderPipeline.LWRP) rpname = "LWRP"; + if(version.RP == lilRenderPipeline.URP) rpname = "URP"; + if(version.RP == lilRenderPipeline.HDRP) rpname = "HDRP"; + if(line.Contains(csdInsertPassPreTag)) + { + GetInsert(ref insertPassPre, line, rpname, ctx); + } + if(line.Contains(csdInsertPassPostTag)) + { + GetInsert(ref insertPassPost, line, rpname, ctx); + } + if(line.Contains(csdInsertUsePassPreTag)) + { + GetInsert(ref insertUsePassPre, line, rpname, ctx); + } + if(line.Contains(csdInsertUsePassPostTag)) + { + GetInsert(ref insertUsePassPost, line, rpname, ctx); + } + } + + private static void GetInsert(ref string insertPass, string line, string rpname, AssetImportContext ctx) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + int third = line.IndexOf('"', second + 1) + 1; + string subpath; + if (third > 1) + { + int fourth = line.IndexOf('"', third); + string name = line.Substring(first, second - first); + if (name.StartsWith("!")) + { + if (origShaderName.Contains(name.Substring(1))) + { + return; + } + } + else if (!origShaderName.Contains(name)) + { + return; + } + subpath = line.Substring(third, fourth - third); + } + else + { + subpath = line.Substring(first, second - first); + } + + // for render pipeline + string pathForRP = assetFolderPath + Path.GetFileNameWithoutExtension(subpath) + rpname + Path.GetExtension(subpath); + if(File.Exists(pathForRP)) + { + AddDependency(ctx, pathForRP); + insertPass = ReadTextFile(pathForRP); + return; + } + + // normal + subpath = assetFolderPath + subpath; + if(!File.Exists(subpath)) + { + Debug.LogWarning("[" + assetName + "] " + "File not found: " + subpath); + return; + } + + AddDependency(ctx, subpath); + insertPass = ReadTextFile(subpath); + } + + private static StringBuilder ReadContainerFile(string path, string rpname, AssetImportContext ctx, bool doOptimize) + { + var sb = new StringBuilder(); + var sr = new StreamReader(path); + string line; + + while((line = sr.ReadLine()) != null) + { + if(!isOrigShaderNameLoaded && line.StartsWith("Shader")) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + if(line.Substring(0, first).Contains("//")) + { + sb.AppendLine(line); + continue; + } + + origShaderName = line.Substring(first, second - first); + isOrigShaderNameLoaded = true; + } + if(line.Contains("lil")) + { + if(line.Contains("lilSkipSettings")) + { + if(line.Substring(0, line.IndexOf("lilSkipSettings") + 1).Contains("//")) + { + sb.AppendLine(line); + continue; + } + + shaderSettingText = ""; + continue; + } + if(line.Contains("lilProperties")) + { + GetProperties(path, rpname, sb, line, ctx, doOptimize); + continue; + } + if(line.Contains("lilSubShader")) + { + if(line.Contains(rpname)) + { + GetSubShader(path, rpname, sb, line, ctx); + } + else if(line.Contains("lilSubShaderInsertPost")) + { + GetSubShaderInsertPost(path, rpname, sb, line, ctx); + } + else if(line.Contains("lilSubShaderInsert")) + { + GetSubShaderInsert(path, rpname, sb, line, ctx); + } + else if(line.Contains("lilSubShaderTags")) + { + GetSubShaderTags(path, rpname, sb, line); + } + continue; + } + if(line.Contains("lilPassShaderName")) + { + GetPassShaderName(path, rpname, sb, line); + continue; + } + } + sb.AppendLine(line); + } + + sr.Close(); + return sb; + } + + private static void GetSubShader(string path, string rpname, StringBuilder sb, string line, AssetImportContext ctx) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + if(line.Substring(0, first).Contains("//")) + { + sb.AppendLine(line); + return; + } + + string subpath = line.Substring(first, second - first); + if(subpath.Contains("Default") && !subpath.Contains(".lilblock")) + { + subpath = resourcesFolderPath + rpname + "/" + subpath + ".lilblock"; + } + else + { + subpath = assetFolderPath + subpath; + } + + if(!File.Exists(subpath)) + { + Debug.LogWarning("[" + assetName + "] " + "File not found: " + subpath); + return; + } + AddDependency(ctx, subpath); + + if(rpname == "URP" && !subpath.Contains("UsePass")) + { + var sb1 = new StringBuilder(ReadTextFile(subpath)); + var sb2 = new StringBuilder(sb1.ToString()); + + sb1.Replace(LIL_DOTS_SM_TAGS, " \"ShaderModel\" = \"4.5\""); + //sb1.Replace(LIL_DOTS_SM_4_5, "#pragma target 4.5" + Environment.NewLine + " #pragma exclude_renderers gles gles3 glcore"); + //sb1.Replace(LIL_DOTS_SM_4_5_OR_3_5, "#pragma target 4.5" + Environment.NewLine + " #pragma exclude_renderers gles gles3 glcore"); + sb1.Replace(LIL_DOTS_SM_4_5, "#pragma target 4.5"); + sb1.Replace(LIL_DOTS_SM_4_5_OR_3_5, "#pragma target 4.5"); + ReplaceMultiCompiles(ref sb1, version, indent, true); + sb.AppendLine(sb1.ToString()); + sb.AppendLine(); + + sb2.Replace(LIL_DOTS_SM_TAGS, ""); + //sb2.Replace(LIL_DOTS_SM_4_5, "#pragma only_renderers gles gles3 glcore d3d11"); + //sb2.Replace(LIL_DOTS_SM_4_5_OR_3_5, "#pragma target 3.5" + Environment.NewLine + " #pragma only_renderers gles gles3 glcore d3d11"); + sb2.Replace(LIL_DOTS_SM_4_5, ""); + sb2.Replace(LIL_DOTS_SM_4_5_OR_3_5, "#pragma target 3.5"); + ReplaceMultiCompiles(ref sb2, version, indent, false); + sb.AppendLine(sb2.ToString()); + } + else + { + sb.AppendLine(ReadTextFile(subpath)); + } + } + + private static void GetSubShaderInsert(string path, string rpname, StringBuilder sb, string line, AssetImportContext ctx) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + if(line.Substring(0, first).Contains("//")) + { + sb.AppendLine(line); + return; + } + + string subpath = assetFolderPath + line.Substring(first, second - first); + if(!File.Exists(subpath)) + { + Debug.LogWarning("[" + assetName + "] " + "File not found: " + subpath); + return; + } + AddDependency(ctx, subpath); + insertText = ReadTextFile(subpath); + } + + private static void GetSubShaderInsertPost(string path, string rpname, StringBuilder sb, string line, AssetImportContext ctx) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + if(line.Substring(0, first).Contains("//")) + { + sb.AppendLine(line); + return; + } + + string subpath = assetFolderPath + line.Substring(first, second - first); + if(!File.Exists(subpath)) + { + Debug.LogWarning("[" + assetName + "] " + "File not found: " + subpath); + return; + } + AddDependency(ctx, subpath); + insertPostText = ReadTextFile(subpath); + } + + private static void GetProperties(string path, string rpname, StringBuilder sb, string line, AssetImportContext ctx, bool doOptimize) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + if(line.Substring(0, first).Contains("//")) + { + sb.AppendLine(line); + return; + } + + string subpath = line.Substring(first, second - first); + if(subpath.Contains("Default") && !subpath.Contains(".lilblock")) + { + subpath = resourcesFolderPath + "Properties/" + subpath + ".lilblock"; + } + else + { + subpath = assetFolderPath + subpath; + } + + if(!File.Exists(subpath)) + { + Debug.LogWarning("[" + assetName + "] " + "File not found: " + subpath); + return; + } + AddDependency(ctx, subpath); + string propText = ReadTextFile(subpath); + if(doOptimize) + { + propText = Regex.Replace(propText, @"\(""[^""]*""", "(\"\""); // Display name + propText = Regex.Replace(propText, @"\[lil[^\]]*\]", ""); // [lil*] + propText = Regex.Replace(propText, @"\[Enum[^\]]*\]", ""); // [Enum(*)] + propText = Regex.Replace(propText, @"\[PowerSlider[^\]]*\]", ""); // [PowerSlider(*)] + propText = propText.Replace("[NoScaleOffset]", ""); + propText = propText.Replace("[HideInInspector]", ""); + propText = propText.Replace("[IntRange]", ""); + } + sb.AppendLine(propText); + } + + private static void GetPassShaderName(string path, string rpname, StringBuilder sb, string line) + { + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + if(line.Substring(0, first).Contains("//")) + { + sb.AppendLine(line); + return; + } + + passShaderName = line.Substring(first, second - first); + } + + private static void GetSubShaderTags(string path, string rpname, StringBuilder sb, string line) + { + int first = line.IndexOf('{') + 1; + int second = line.IndexOf('}', first); + if(line.Substring(0, first).Contains("//")) + { + sb.AppendLine(line); + return; + } + + subShaderTags = line.Substring(first, second - first); + #if LILTOON_LTCGI + subShaderTags += " \"LTCGI\"=\"ALWAYS\""; + #endif + } + + private static string ReadTextFile(string path) + { + var sr = new StreamReader(path); + string text = sr.ReadToEnd(); + sr.Close(); + return text; + } + + private static string FixNewlineCode(string text) + { + return text.Replace("\\r", "\r").Replace("\\n", "\n"); + } + + private static void FixIncludeForOldUnity(ref StringBuilder sb) + { + #if UNITY_2019_4_0 || UNITY_2019_4_1 || UNITY_2019_4_2 || UNITY_2019_4_3 || UNITY_2019_4_4 || UNITY_2019_4_5 || UNITY_2019_4_6 || UNITY_2019_4_7 || UNITY_2019_4_8 || UNITY_2019_4_9 || UNITY_2019_4_10 + string additionalPath = assetFolderPath.Replace("\\", "/"); + var escapes = Environment.NewLine.ToCharArray(); + var text = sb.ToString().Split(escapes[0]); + sb.Clear(); + + if(escapes.Length >= 1) + { + foreach(var escape in escapes) + { + for(int i = 0; i < text.Length; i++) + { + text[i] = text[i].Replace(escape.ToString(), ""); + } + } + } + + foreach(var line in text) + { + if(line.Contains("#include \"") && !line.Contains("\"Assets/") && !line.Contains("\"Packages/")) + { + sb.AppendLine(line.Replace("#include \"", "#include \"" + additionalPath)); + } + else + { + sb.AppendLine(line); + } + } + #endif + } + + private static void AddHLSLDependency(string assetFolderPath, AssetImportContext ctx) + { + if(ctx == null) return; + + foreach(var assetpath in lilDirectoryManager.FindAssetsPath("", new[]{assetFolderPath}).Where(p => !p.Contains("lilcontainer"))) + { + AddDependency(ctx, assetpath); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Utils + private static string GetIndent(int indent) + { + return new string(' ', indent); + } + + private static string GenerateIndentText(int indent, params string[] texts) + { + string ind = Environment.NewLine + GetIndent(indent); + return string.Join(ind, texts); + } + + private static string GetRelativePath(string fromPath, string toPath) + { + var fromUri = new Uri(Path.GetFullPath(fromPath)); + var toUri = new Uri(Path.GetFullPath(toPath)); + + string relativePath = Uri.UnescapeDataString(fromUri.MakeRelativeUri(toUri).ToString()); + relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, '/'); + + return relativePath; + } + + private static void LightModeOverride(ref StringBuilder sb, string passName, string lightModeName) + { + if(!string.IsNullOrEmpty(lightModeName)) + { + sb.Replace( + " Name \"" + passName + "\"" + Environment.NewLine + " Tags {\"LightMode\" = \"" + LIL_LIGHTMODE_FORWARD_0 + "\"}", + " Name \"" + passName + "\"" + Environment.NewLine + " Tags {\"LightMode\" = \"" + lightModeName + "\"}" + ); + sb.Replace( + " Name \"" + passName + "\"" + Environment.NewLine + " Tags {\"LightMode\" = \"" + LIL_LIGHTMODE_FORWARD_1 + "\"}", + " Name \"" + passName + "\"" + Environment.NewLine + " Tags {\"LightMode\" = \"" + lightModeName + "\"}" + ); + sb.Replace( + " Name \"" + passName + "\"" + Environment.NewLine + " Tags {\"LightMode\" = \"" + LIL_LIGHTMODE_FORWARD_2 + "\"}", + " Name \"" + passName + "\"" + Environment.NewLine + " Tags {\"LightMode\" = \"" + lightModeName + "\"}" + ); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // ForwardAdd + public static void RewriteForwardAdd(ref StringBuilder sb) + { + bool enable = GetBoolField("LIL_OPTIMIZE_USE_FORWARDADD", true); + + if(enable) + { + sb.Replace( + " // ForwardAdd Start" + Environment.NewLine + " /*", + " // ForwardAdd Start" + Environment.NewLine + " //"); + sb.Replace( + " */" + Environment.NewLine + " // ForwardAdd End", + " //" + Environment.NewLine + " // ForwardAdd End"); + } + else + { + sb.Replace( + " // ForwardAdd Start" + Environment.NewLine + " //", + " // ForwardAdd Start" + Environment.NewLine + " /*"); + sb.Replace( + " //" + Environment.NewLine + " // ForwardAdd End", + " */" + Environment.NewLine + " // ForwardAdd End"); + } + + var lines = sb.ToString().Split('\n'); + sb = new StringBuilder(); + for(int i = 0; i < lines.Length; i++) + { + string line = lines[i]; + line = line.Replace("\r", ""); + + if(line.Contains("UsePass") && line.Contains("FORWARD_ADD")) + { + if(enable) + { + line = line.Replace( + " //UsePass", + " UsePass"); + } + else + { + line = line.Replace( + " UsePass", + " //UsePass"); + } + } + sb.AppendLine(line); + } + } + + public static void RewriteForwardAddShadow(ref StringBuilder sb) + { + bool enable = GetBoolField("LIL_OPTIMIZE_USE_FORWARDADD_SHADOW"); + + if(enable) + { + sb.Replace( + "#pragma multi_compile_fragment POINT DIRECTIONAL SPOT POINT_COOKIE DIRECTIONAL_COOKIE", + "#pragma multi_compile_fwdadd_fullshadows"); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Multi Compile + private static void ReplaceMultiCompiles(ref StringBuilder sb, PackageVersionInfos version, int indent, bool isDots) + { + sb.Replace(MULTI_COMPILE_FORWARDADD, GetMultiCompileForwardAdd(version, indent)); + sb.Replace(MULTI_COMPILE_FORWARD, GetMultiCompileForward(version, indent)); + sb.Replace(MULTI_COMPILE_SHADOWCASTER, GetMultiCompileShadowCaster(version, indent)); + sb.Replace(MULTI_COMPILE_DEPTHONLY, GetMultiCompileDepthOnly(version, indent)); + sb.Replace(MULTI_COMPILE_DEPTHNORMALS, GetMultiCompileDepthNormals(version, indent)); + sb.Replace(MULTI_COMPILE_MOTIONVECTORS, GetMultiCompileMotionVectors(version, indent)); + sb.Replace(MULTI_COMPILE_SCENESELECTION, GetMultiCompileSceneSelection(version, indent)); + sb.Replace(MULTI_COMPILE_META, GetMultiCompileMeta(version, indent)); + sb.Replace(MULTI_COMPILE_INSTANCING, GetMultiCompileInstancingLayer(version, indent, isDots)); + } + + private static void ReplaceMultiCompiles(ref string sb, PackageVersionInfos version, int indent, bool isDots) + { + sb = sb.Replace(MULTI_COMPILE_FORWARDADD, GetMultiCompileForwardAdd(version, indent)) + .Replace(MULTI_COMPILE_FORWARD, GetMultiCompileForward(version, indent)) + .Replace(MULTI_COMPILE_SHADOWCASTER, GetMultiCompileShadowCaster(version, indent)) + .Replace(MULTI_COMPILE_DEPTHONLY, GetMultiCompileDepthOnly(version, indent)) + .Replace(MULTI_COMPILE_DEPTHNORMALS, GetMultiCompileDepthNormals(version, indent)) + .Replace(MULTI_COMPILE_MOTIONVECTORS, GetMultiCompileMotionVectors(version, indent)) + .Replace(MULTI_COMPILE_SCENESELECTION, GetMultiCompileSceneSelection(version, indent)) + .Replace(MULTI_COMPILE_META, GetMultiCompileMeta(version, indent)) + .Replace(MULTI_COMPILE_INSTANCING, GetMultiCompileInstancingLayer(version, indent, isDots)); + } + + private static string GetMultiCompileForward(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS", + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE", + "#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS", + "#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS", + "#pragma multi_compile_fragment _ _SHADOWS_SOFT", + "#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARD"); + } + else if(version.RP == lilRenderPipeline.URP) + { + if(version.Major >= 16) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN", + "#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS", + // Always calculate in vertex shader + //"#pragma multi_compile _ EVALUATE_SH_MIXED EVALUATE_SH_VERTEX", + "#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS", + "#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING", + "#pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION", + "#pragma multi_compile_fragment _ _SHADOWS_SOFT", + "#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION", + "#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3", + "#pragma multi_compile _ _LIGHT_LAYERS", + "#pragma multi_compile_fragment _ _LIGHT_COOKIES", + "#pragma multi_compile _ _FORWARD_PLUS", + "#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING", + "#pragma multi_compile _ SHADOWS_SHADOWMASK", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile _ DYNAMICLIGHTMAP_ON", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARD"); + } + if(version.Major >= 14) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN", + "#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS", + "#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS", + "#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING", + "#pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION", + "#pragma multi_compile_fragment _ _SHADOWS_SOFT", + "#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION", + "#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3", + "#pragma multi_compile _ _LIGHT_LAYERS", + "#pragma multi_compile_fragment _ _LIGHT_COOKIES", + "#pragma multi_compile _ _FORWARD_PLUS", + "#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING", + "#pragma multi_compile _ SHADOWS_SHADOWMASK", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile _ DYNAMICLIGHTMAP_ON", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARD"); + } + if(version.Major >= 12) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN", + "#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS", + "#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS", + "#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING", + "#pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION", + "#pragma multi_compile_fragment _ _SHADOWS_SOFT", + "#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION", + "#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3", + "#pragma multi_compile _ _LIGHT_LAYERS", + "#pragma multi_compile_fragment _ _LIGHT_COOKIES", + "#pragma multi_compile _ _CLUSTERED_RENDERING", + "#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING", + "#pragma multi_compile _ SHADOWS_SHADOWMASK", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile _ DYNAMICLIGHTMAP_ON", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARD"); + } + if(version.Major >= 11) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN", + "#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS", + "#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS", + "#pragma multi_compile_fragment _ _SHADOWS_SOFT", + "#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION", + "#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING", + "#pragma multi_compile _ SHADOWS_SHADOWMASK", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARD"); + } + if(version.Major >= 10) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS", + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE", + "#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS", + "#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS", + "#pragma multi_compile_fragment _ _SHADOWS_SOFT", + "#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION", + "#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING", + "#pragma multi_compile _ SHADOWS_SHADOWMASK", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARD"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS", + "#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE", + "#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS", + "#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS", + "#pragma multi_compile_fragment _ _SHADOWS_SOFT", + "#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARD"); + } + } + else if(version.RP == lilRenderPipeline.HDRP) + { + if(version.Major >= 12) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ DYNAMICLIGHTMAP_ON", + "#pragma multi_compile_fragment _ SHADOWS_SHADOWMASK", + "#pragma multi_compile_fragment PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2", + "#pragma multi_compile_fragment SCREEN_SPACE_SHADOWS_OFF SCREEN_SPACE_SHADOWS_ON", + "#pragma multi_compile_fragment DECALS_OFF DECALS_3RT DECALS_4RT", + "#pragma multi_compile_fragment _ DECAL_SURFACE_GRADIENT", + "#pragma multi_compile_fragment SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH", + "#pragma multi_compile_fragment USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST", + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_FORWARD", + "#define HAS_LIGHTLOOP", + "#define LIL_PASS_FORWARD"); + } + if(version.Major >= 10) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ DYNAMICLIGHTMAP_ON", + "#pragma multi_compile_fragment _ SHADOWS_SHADOWMASK", + "#pragma multi_compile_fragment SCREEN_SPACE_SHADOWS_OFF SCREEN_SPACE_SHADOWS_ON", + "#pragma multi_compile_fragment DECALS_OFF DECALS_3RT DECALS_4RT", + "#pragma multi_compile_fragment SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH", + "#pragma multi_compile_fragment USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST", + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_FORWARD", + "#define HAS_LIGHTLOOP", + "#define LIL_PASS_FORWARD"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile _ LIGHTMAP_ON", + "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", + "#pragma multi_compile _ DYNAMICLIGHTMAP_ON", + "#pragma multi_compile_fragment _ SHADOWS_SHADOWMASK", + "#pragma multi_compile_fragment DECALS_OFF DECALS_3RT DECALS_4RT", + "#pragma multi_compile_fragment SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH", + "#pragma multi_compile_fragment USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST", + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_FORWARD", + "#define HAS_LIGHTLOOP", + "#define LIL_PASS_FORWARD"); + } + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_fwdbase", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + #if LILTOON_LTCGI + "#define LIL_FEATURE_LTCGI", + #endif + "#define LIL_PASS_FORWARD"); + } + } + + private static string GetMultiCompileForwardAdd(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARDADD"); + } + else if(version.RP == lilRenderPipeline.URP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARDADD"); + } + else if(version.RP == lilRenderPipeline.HDRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARDADD"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_fragment POINT DIRECTIONAL SPOT POINT_COOKIE DIRECTIONAL_COOKIE", + "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", + "#pragma multi_compile_instancing", + "#define LIL_PASS_FORWARDADD"); + } + } + + private static string GetMultiCompileShadowCaster(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_SHADOWCASTER"); + } + else if(version.RP == lilRenderPipeline.URP) + { + if(version.Major >= 11) + { + return GenerateIndentText(indent, + "#pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW", + "#pragma multi_compile_instancing", + "#define LIL_PASS_SHADOWCASTER"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_SHADOWCASTER"); + } + } + else if(version.RP == lilRenderPipeline.HDRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_SHADOWS", + "#define LIL_PASS_SHADOWCASTER"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_shadowcaster", + "#pragma multi_compile_instancing", + "#define LIL_PASS_SHADOWCASTER"); + } + } + + private static string GetMultiCompileDepthOnly(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_DEPTHONLY"); + } + else if(version.RP == lilRenderPipeline.URP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_DEPTHONLY"); + } + else if(version.RP == lilRenderPipeline.HDRP) + { + if(version.Major >= 10) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ WRITE_NORMAL_BUFFER", + "#pragma multi_compile_fragment _ WRITE_MSAA_DEPTH", + "#pragma multi_compile _ WRITE_DECAL_BUFFER", + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_DEPTH_ONLY", + "#define LIL_PASS_DEPTHONLY"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile _ WRITE_NORMAL_BUFFER", + "#pragma multi_compile_fragment _ WRITE_MSAA_DEPTH", + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_DEPTH_ONLY", + "#define LIL_PASS_DEPTHONLY"); + } + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_DEPTHONLY"); + } + } + + private static string GetMultiCompileDepthNormals(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_DEPTHNORMALS"); + } + else if(version.RP == lilRenderPipeline.URP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_DEPTHNORMALS"); + } + else if(version.RP == lilRenderPipeline.HDRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_DEPTHNORMALS"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_DEPTHNORMALS"); + } + } + + private static string GetMultiCompileMotionVectors(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_MOTIONVECTORS"); + } + else if(version.RP == lilRenderPipeline.URP) + { + if(version.Major >= 16) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_MOTIONVECTORS"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_MOTIONVECTORS"); + } + } + else if(version.RP == lilRenderPipeline.HDRP) + { + if(version.Major >= 10) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ WRITE_NORMAL_BUFFER", + "#pragma multi_compile_fragment _ WRITE_MSAA_DEPTH", + "#pragma multi_compile _ WRITE_DECAL_BUFFER", + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_MOTION_VECTORS", + "#define LIL_PASS_MOTIONVECTORS"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile _ WRITE_NORMAL_BUFFER", + "#pragma multi_compile_fragment _ WRITE_MSAA_DEPTH", + "#pragma multi_compile_instancing", + "#define SHADERPASS SHADERPASS_MOTION_VECTORS", + "#define LIL_PASS_MOTIONVECTORS"); + } + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_MOTIONVECTORS"); + } + } + + private static string GetMultiCompileSceneSelection(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_SCENESELECTION"); + } + else if(version.RP == lilRenderPipeline.URP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_SCENESELECTION"); + } + else if(version.RP == lilRenderPipeline.HDRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#pragma editor_sync_compilation", + "#define SHADERPASS SHADERPASS_DEPTH_ONLY", + "#define SCENESELECTIONPASS", + "#define LIL_PASS_SCENESELECTION"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#define LIL_PASS_SCENESELECTION"); + } + } + + private static string GetMultiCompileMeta(PackageVersionInfos version, int indent) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma shader_feature EDITOR_VISUALIZATION", + "#define LIL_PASS_META"); + } + else if(version.RP == lilRenderPipeline.URP) + { + return GenerateIndentText(indent, + "#pragma shader_feature EDITOR_VISUALIZATION", + "#define LIL_PASS_META"); + } + else if(version.RP == lilRenderPipeline.HDRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#pragma shader_feature EDITOR_VISUALIZATION", + "#define SHADERPASS SHADERPASS_LIGHT_TRANSPORT", + "#define LIL_PASS_META"); + } + else + { + return GenerateIndentText(indent, + "#pragma shader_feature EDITOR_VISUALIZATION", + "#define LIL_PASS_META"); + } + } + + private static string GetMultiCompileInstancingLayer(PackageVersionInfos version, int indent, bool isDots = false) + { + if(version.RP == lilRenderPipeline.LWRP) + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing"); + } + else if(version.RP == lilRenderPipeline.URP) + { + if(version.Major >= 12) + { + if(isDots) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ DOTS_INSTANCING_ON", + "#pragma multi_compile_instancing", + "#pragma instancing_options renderinglayer"); + } + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#pragma instancing_options renderinglayer"); + } + else if(version.Major >= 9) + { + if(isDots) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ DOTS_INSTANCING_ON", + "#pragma multi_compile_instancing"); + } + return GenerateIndentText(indent, + "#pragma multi_compile_instancing"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing"); + } + } + else if(version.RP == lilRenderPipeline.HDRP) + { + if(version.Major >= 9 && isDots) + { + return GenerateIndentText(indent, + "#pragma multi_compile _ DOTS_INSTANCING_ON", + "#pragma multi_compile_instancing", + "#pragma instancing_options renderinglayer"); + } + return GenerateIndentText(indent, + "#pragma multi_compile_instancing", + "#pragma instancing_options renderinglayer"); + } + else + { + return GenerateIndentText(indent, + "#pragma multi_compile_instancing"); + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Skip Variants + private static string GetSkipVariantsShadows() + { + return "#pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH"; + } + + private static string GetSkipVariantsLightmaps() + { + return "#pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE"; + } + + private static string GetSkipVariantsDecals() + { + return "#pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3"; + } + + private static string GetSkipVariantsAddLight() + { + //return "#pragma skip_variants VERTEXLIGHT_ON LIGHTPROBE_SH _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS"; + return "#pragma skip_variants VERTEXLIGHT_ON LIGHTPROBE_SH"; + } + + private static string GetSkipVariantsAddLightShadows() + { + return "#pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS"; + } + + private static string GetSkipVariantsProbeVolumes() + { + return "#pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2"; + } + + private static string GetSkipVariantsAO() + { + return "#pragma skip_variants _SCREEN_SPACE_OCCLUSION"; + } + + private static string GetSkipVariantsLightLists() + { + return "#pragma skip_variants USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST"; + } + + private static string GetSkipVariantsReflections() + { + return "#pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION"; + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Avoid Errors + public static string BuildShaderSettingString(bool isFile, ref bool useBaseShadow, ref bool useOutlineShadow) + { + var methods = typeof(lilToonSetting).GetMethods(BindingFlags.Static | BindingFlags.Public); + foreach(var method in methods) + { + var methodParams = method.GetParameters(); + if(method.Name != "BuildShaderSettingString" || methodParams.Length != 3 || methodParams[0].ParameterType != typeof(bool)) continue; + var objs = new object[]{isFile,useBaseShadow,useOutlineShadow}; + string outstr = (string)method.Invoke(null, objs); + useBaseShadow = (bool)objs[1]; + useOutlineShadow = (bool)objs[2]; + return outstr; + } + return ""; + } + + private static bool GetBoolField(string name, bool def = false) + { + var val = GetFieldValue(name); + return val == null ? def : (bool)val; + } + + private static string GetStringField(string name) + { + var val = GetFieldValue(name); + return val == null ? "" : (string)val; + } + + private static object GetFieldValue(string name) + { + var field = typeof(lilToonSetting).GetField(name); + if(field == null) return null; + + lilToonSetting shaderSetting = InitSetting(); + if(shaderSetting == null) return null; + + return field.GetValue(shaderSetting); + } + + private static lilToonSetting InitSetting() + { + var method = typeof(lilToonSetting).GetMethod("InitializeShaderSetting", BindingFlags.Static | BindingFlags.NonPublic); + if(method == null) return null; + + lilToonSetting shaderSetting = null; + var objs = new object[]{shaderSetting}; + method.Invoke(null, objs); + return (lilToonSetting)objs[0]; + } + + private static void AddDependency(AssetImportContext ctx, string path) + { + #if UNITY_2018_2_OR_NEWER + if(ctx != null) ctx.DependsOnSourceAsset(path); + #endif + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilShaderContainerImporter.cs.meta b/Assets/External/lilToon/Editor/lilShaderContainerImporter.cs.meta new file mode 100644 index 00000000..7f0d2160 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilShaderContainerImporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3089979ac9fdd004ba564a7e5418ee8d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilShaderManager.cs b/Assets/External/lilToon/Editor/lilShaderManager.cs new file mode 100644 index 00000000..bf98f5ec --- /dev/null +++ b/Assets/External/lilToon/Editor/lilShaderManager.cs @@ -0,0 +1,159 @@ +#if UNITY_EDITOR +using UnityEngine; + +namespace lilToon +{ + public class lilShaderManager + { + public static Shader lts = Shader.Find("lilToon"); + public static Shader ltsc = Shader.Find("Hidden/lilToonCutout"); + public static Shader ltst = Shader.Find("Hidden/lilToonTransparent"); + public static Shader ltsot = Shader.Find("Hidden/lilToonOnePassTransparent"); + public static Shader ltstt = Shader.Find("Hidden/lilToonTwoPassTransparent"); + + public static Shader ltso = Shader.Find("Hidden/lilToonOutline"); + public static Shader ltsco = Shader.Find("Hidden/lilToonCutoutOutline"); + public static Shader ltsto = Shader.Find("Hidden/lilToonTransparentOutline"); + public static Shader ltsoto = Shader.Find("Hidden/lilToonOnePassTransparentOutline"); + public static Shader ltstto = Shader.Find("Hidden/lilToonTwoPassTransparentOutline"); + + public static Shader ltsoo = Shader.Find("_lil/[Optional] lilToonOutlineOnly"); + public static Shader ltscoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyCutout"); + public static Shader ltstoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyTransparent"); + + public static Shader ltstess = Shader.Find("Hidden/lilToonTessellation"); + public static Shader ltstessc = Shader.Find("Hidden/lilToonTessellationCutout"); + public static Shader ltstesst = Shader.Find("Hidden/lilToonTessellationTransparent"); + public static Shader ltstessot = Shader.Find("Hidden/lilToonTessellationOnePassTransparent"); + public static Shader ltstesstt = Shader.Find("Hidden/lilToonTessellationTwoPassTransparent"); + + public static Shader ltstesso = Shader.Find("Hidden/lilToonTessellationOutline"); + public static Shader ltstessco = Shader.Find("Hidden/lilToonTessellationCutoutOutline"); + public static Shader ltstessto = Shader.Find("Hidden/lilToonTessellationTransparentOutline"); + public static Shader ltstessoto = Shader.Find("Hidden/lilToonTessellationOnePassTransparentOutline"); + public static Shader ltstesstto = Shader.Find("Hidden/lilToonTessellationTwoPassTransparentOutline"); + + public static Shader ltsl = Shader.Find("Hidden/lilToonLite"); + public static Shader ltslc = Shader.Find("Hidden/lilToonLiteCutout"); + public static Shader ltslt = Shader.Find("Hidden/lilToonLiteTransparent"); + public static Shader ltslot = Shader.Find("Hidden/lilToonLiteOnePassTransparent"); + public static Shader ltsltt = Shader.Find("Hidden/lilToonLiteTwoPassTransparent"); + + public static Shader ltslo = Shader.Find("Hidden/lilToonLiteOutline"); + public static Shader ltslco = Shader.Find("Hidden/lilToonLiteCutoutOutline"); + public static Shader ltslto = Shader.Find("Hidden/lilToonLiteTransparentOutline"); + public static Shader ltsloto = Shader.Find("Hidden/lilToonLiteOnePassTransparentOutline"); + public static Shader ltsltto = Shader.Find("Hidden/lilToonLiteTwoPassTransparentOutline"); + + public static Shader ltsref = Shader.Find("Hidden/lilToonRefraction"); + public static Shader ltsrefb = Shader.Find("Hidden/lilToonRefractionBlur"); + public static Shader ltsfur = Shader.Find("Hidden/lilToonFur"); + public static Shader ltsfurc = Shader.Find("Hidden/lilToonFurCutout"); + public static Shader ltsfurtwo = Shader.Find("Hidden/lilToonFurTwoPass"); + public static Shader ltsfuro = Shader.Find("_lil/[Optional] lilToonFurOnlyTransparent"); + public static Shader ltsfuroc = Shader.Find("_lil/[Optional] lilToonFurOnlyCutout"); + public static Shader ltsfurotwo = Shader.Find("_lil/[Optional] lilToonFurOnlyTwoPass"); + + public static Shader ltsgem = Shader.Find("Hidden/lilToonGem"); + + public static Shader ltsfs = Shader.Find("_lil/[Optional] lilToonFakeShadow"); + + public static Shader ltsover = Shader.Find("_lil/[Optional] lilToonOverlay"); + public static Shader ltsoover = Shader.Find("_lil/[Optional] lilToonOverlayOnePass"); + public static Shader ltslover = Shader.Find("_lil/[Optional] lilToonLiteOverlay"); + public static Shader ltsloover = Shader.Find("_lil/[Optional] lilToonLiteOverlayOnePass"); + + public static Shader ltsbaker = Shader.Find("Hidden/ltsother_baker"); + public static Shader ltspo = Shader.Find("Hidden/ltspass_opaque"); + public static Shader ltspc = Shader.Find("Hidden/ltspass_cutout"); + public static Shader ltspt = Shader.Find("Hidden/ltspass_transparent"); + public static Shader ltsptesso = Shader.Find("Hidden/ltspass_tess_opaque"); + public static Shader ltsptessc = Shader.Find("Hidden/ltspass_tess_cutout"); + public static Shader ltsptesst = Shader.Find("Hidden/ltspass_tess_transparent"); + + public static Shader ltsm = Shader.Find("_lil/lilToonMulti"); + public static Shader ltsmo = Shader.Find("Hidden/lilToonMultiOutline"); + public static Shader ltsmref = Shader.Find("Hidden/lilToonMultiRefraction"); + public static Shader ltsmfur = Shader.Find("Hidden/lilToonMultiFur"); + public static Shader ltsmgem = Shader.Find("Hidden/lilToonMultiGem"); + public static Shader mtoon = Shader.Find("VRM/MToon"); + + public static void InitializeShaders() + { + lts = Shader.Find("lilToon"); + ltsc = Shader.Find("Hidden/lilToonCutout"); + ltst = Shader.Find("Hidden/lilToonTransparent"); + ltsot = Shader.Find("Hidden/lilToonOnePassTransparent"); + ltstt = Shader.Find("Hidden/lilToonTwoPassTransparent"); + + ltso = Shader.Find("Hidden/lilToonOutline"); + ltsco = Shader.Find("Hidden/lilToonCutoutOutline"); + ltsto = Shader.Find("Hidden/lilToonTransparentOutline"); + ltsoto = Shader.Find("Hidden/lilToonOnePassTransparentOutline"); + ltstto = Shader.Find("Hidden/lilToonTwoPassTransparentOutline"); + + ltsoo = Shader.Find("_lil/[Optional] lilToonOutlineOnly"); + ltscoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyCutout"); + ltstoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyTransparent"); + + ltstess = Shader.Find("Hidden/lilToonTessellation"); + ltstessc = Shader.Find("Hidden/lilToonTessellationCutout"); + ltstesst = Shader.Find("Hidden/lilToonTessellationTransparent"); + ltstessot = Shader.Find("Hidden/lilToonTessellationOnePassTransparent"); + ltstesstt = Shader.Find("Hidden/lilToonTessellationTwoPassTransparent"); + + ltstesso = Shader.Find("Hidden/lilToonTessellationOutline"); + ltstessco = Shader.Find("Hidden/lilToonTessellationCutoutOutline"); + ltstessto = Shader.Find("Hidden/lilToonTessellationTransparentOutline"); + ltstessoto = Shader.Find("Hidden/lilToonTessellationOnePassTransparentOutline"); + ltstesstto = Shader.Find("Hidden/lilToonTessellationTwoPassTransparentOutline"); + + ltsl = Shader.Find("Hidden/lilToonLite"); + ltslc = Shader.Find("Hidden/lilToonLiteCutout"); + ltslt = Shader.Find("Hidden/lilToonLiteTransparent"); + ltslot = Shader.Find("Hidden/lilToonLiteOnePassTransparent"); + ltsltt = Shader.Find("Hidden/lilToonLiteTwoPassTransparent"); + + ltslo = Shader.Find("Hidden/lilToonLiteOutline"); + ltslco = Shader.Find("Hidden/lilToonLiteCutoutOutline"); + ltslto = Shader.Find("Hidden/lilToonLiteTransparentOutline"); + ltsloto = Shader.Find("Hidden/lilToonLiteOnePassTransparentOutline"); + ltsltto = Shader.Find("Hidden/lilToonLiteTwoPassTransparentOutline"); + + ltsref = Shader.Find("Hidden/lilToonRefraction"); + ltsrefb = Shader.Find("Hidden/lilToonRefractionBlur"); + ltsfur = Shader.Find("Hidden/lilToonFur"); + ltsfurc = Shader.Find("Hidden/lilToonFurCutout"); + ltsfurtwo = Shader.Find("Hidden/lilToonFurTwoPass"); + ltsfuro = Shader.Find("_lil/[Optional] lilToonFurOnlyTransparent"); + ltsfuroc = Shader.Find("_lil/[Optional] lilToonFurOnlyCutout"); + ltsfurotwo = Shader.Find("_lil/[Optional] lilToonFurOnlyTwoPass"); + + ltsgem = Shader.Find("Hidden/lilToonGem"); + + ltsfs = Shader.Find("_lil/[Optional] lilToonFakeShadow"); + + ltsover = Shader.Find("_lil/[Optional] lilToonOverlay"); + ltsoover = Shader.Find("_lil/[Optional] lilToonOverlayOnePass"); + ltslover = Shader.Find("_lil/[Optional] lilToonLiteOverlay"); + ltsloover = Shader.Find("_lil/[Optional] lilToonLiteOverlayOnePass"); + + ltsbaker = Shader.Find("Hidden/ltsother_baker"); + ltspo = Shader.Find("Hidden/ltspass_opaque"); + ltspc = Shader.Find("Hidden/ltspass_cutout"); + ltspt = Shader.Find("Hidden/ltspass_transparent"); + ltsptesso = Shader.Find("Hidden/ltspass_tess_opaque"); + ltsptessc = Shader.Find("Hidden/ltspass_tess_cutout"); + ltsptesst = Shader.Find("Hidden/ltspass_tess_transparent"); + + ltsm = Shader.Find("_lil/lilToonMulti"); + ltsmo = Shader.Find("Hidden/lilToonMultiOutline"); + ltsmref = Shader.Find("Hidden/lilToonMultiRefraction"); + ltsmfur = Shader.Find("Hidden/lilToonMultiFur"); + ltsmgem = Shader.Find("Hidden/lilToonMultiGem"); + + mtoon = Shader.Find("VRM/MToon"); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilShaderManager.cs.meta b/Assets/External/lilToon/Editor/lilShaderManager.cs.meta new file mode 100644 index 00000000..937292e1 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilShaderManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf7f696b10993fb42a637d34deb7de09 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilStartup.cs b/Assets/External/lilToon/Editor/lilStartup.cs new file mode 100644 index 00000000..43fb8777 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilStartup.cs @@ -0,0 +1,343 @@ +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; +using UnityEngine.Networking; +using System; +using System.IO; +using System.Collections; +using System.Reflection; +using System.Collections.Generic; +using System.Linq; + +namespace lilToon +{ + public static class lilStartup + { + [InitializeOnLoadMethod] + public static void lilStartupMethod() + { + //------------------------------------------------------------------------------------------------------------------------------ + // Variables + #pragma warning disable CS0612 + lilLanguageManager.InitializeLanguage(); + #pragma warning restore CS0612 + + AssetDatabase.importPackageStarted -= PackageVersionChecker; + AssetDatabase.importPackageStarted += PackageVersionChecker; + EditorApplication.playModeStateChanged -= PlayModeStateChanged; + EditorApplication.playModeStateChanged += PlayModeStateChanged; + + //------------------------------------------------------------------------------------------------------------------------------ + // Create files + if(!lilEditorParameters.instance.startupEnd) + { + lilEditorParameters.instance.startupEnd = true; + + #if LILTOON_DISABLE_ASSET_MODIFICATION == false + #if !SYSTEM_DRAWING + string editorPath = lilDirectoryManager.GetEditorPath(); + + // RSP + if(!File.Exists(lilDirectoryManager.rspPath)) + { + var sw = new StreamWriter(lilDirectoryManager.rspPath,true); + sw.Write("-r:System.Drawing.dll" + Environment.NewLine + "-define:SYSTEM_DRAWING"); + sw.Close(); + AssetDatabase.Refresh(); + AssetDatabase.ImportAsset(editorPath); + } + + var sr = new StreamReader(lilDirectoryManager.rspPath); + string s = sr.ReadToEnd(); + sr.Close(); + + if(!s.Contains("r:System.Drawing.dll")) + { + var sw = new StreamWriter(lilDirectoryManager.rspPath,true); + sw.Write(Environment.NewLine + "-r:System.Drawing.dll"); + sw.Close(); + AssetDatabase.Refresh(); + AssetDatabase.ImportAsset(editorPath); + } + if(!s.Contains("define:SYSTEM_DRAWING")) + { + var sw = new StreamWriter(lilDirectoryManager.rspPath,true); + sw.Write(Environment.NewLine + "-define:SYSTEM_DRAWING"); + sw.Close(); + AssetDatabase.Refresh(); + AssetDatabase.ImportAsset(editorPath); + } + #endif + #endif //LILTOON_DISABLE_ASSET_MODIFICATION + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Shader setting + lilToonSetting shaderSetting = null; + lilToonSetting.InitializeShaderSetting(ref shaderSetting); + string currentRPPath = lilDirectoryManager.GetCurrentRPPath(); + if(File.Exists(currentRPPath)) + { + var srRP = new StreamReader(currentRPPath); + string shaderRP = srRP.ReadLine(); + string shaderAPI = srRP.ReadLine(); + string shaderLTCGI = srRP.ReadLine(); + srRP.Close(); + + bool shouldRewrite = false; + string projectRP = lilRenderPipelineReader.GetRP().ToString(); + string projectAPI = SystemInfo.graphicsDeviceType.ToString(); + #if LILTOON_LTCGI + string projectLTCGI = "LTCGI"; + #else + string projectLTCGI = ""; + #endif + var swRP = new StreamWriter(currentRPPath,false); + swRP.WriteLine(projectRP); + swRP.WriteLine(projectAPI); + swRP.WriteLine(projectLTCGI); + swRP.Close(); + + if(shaderRP != projectRP) + { + Debug.Log("[lilToon] Switch " + shaderRP + " to " + projectRP); + shouldRewrite = true; + } + + if(shaderAPI != projectAPI) + { + Debug.Log("[lilToon] Switch " + shaderAPI + " to " + projectAPI); + shouldRewrite = true; + } + + if(shaderLTCGI != projectLTCGI) + { + Debug.Log("[lilToon] Switch LTCGI"); + shouldRewrite = true; + } + + if(shouldRewrite) + { + if(shaderSetting.isDebugOptimize) + { + lilToonSetting.ApplyShaderSettingOptimized(); + } + else + { + if(lilShaderAPI.IsTextureLimitedAPI()) + { + lilToonSetting.TurnOffAllShaderSetting(ref shaderSetting); + lilToonSetting.CheckTextures(ref shaderSetting); + } + + lilToonSetting.TurnOnAllShaderSetting(ref shaderSetting); + lilToonSetting.ApplyShaderSetting(shaderSetting); + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Version check + if(string.IsNullOrEmpty(lilEditorParameters.instance.versionInfo)) + { + CoroutineHandler.StartStaticCoroutine(GetLatestVersionInfo()); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Update + if(shaderSetting.previousVersion != lilConstants.currentVersionValue) + { + // Migrate Materials + if(shaderSetting.isMigrateInStartUp) EditorApplication.delayCall += MigrateMaterials; + shaderSetting.previousVersion = lilConstants.currentVersionValue; + lilToonSetting.SaveShaderSetting(shaderSetting); + + #if UNITY_2019_4_OR_NEWER + // Update custom shaders + var folders = new List(); + foreach(var shaderPath in lilDirectoryManager.FindAssetsPath("t:shader").Where(p => p.Contains(".lilcontainer"))) + { + string folder = Path.GetDirectoryName(shaderPath); + if(folders.Contains(folder)) continue; + var shader = AssetDatabase.LoadAssetAtPath(shaderPath); + int versionIndex = shader.FindPropertyIndex("_lilToonVersion"); + if( + versionIndex != -1 && + shader.GetPropertyDefaultFloatValue(versionIndex) == lilConstants.currentVersionValue && + !ShaderUtil.ShaderHasError(shader) + ) continue; + folders.Add(folder); + } + foreach(var folder in folders) + { + AssetDatabase.ImportAsset(folder, ImportAssetOptions.ImportRecursive); + } + #endif + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Turn on all settings when auto + if(!string.IsNullOrEmpty(lilEditorParameters.instance.modifiedShaders)) + { + EditorApplication.delayCall -= lilToonSetting.SetShaderSettingAfterBuild; + EditorApplication.delayCall += lilToonSetting.SetShaderSettingAfterBuild; + } + } + + private static void PlayModeStateChanged(PlayModeStateChange playModeStateChange) + { + if(playModeStateChange == PlayModeStateChange.EnteredEditMode) + { + lilToonSetting.SetShaderSettingAfterBuild(); + } + } + + private static IEnumerator GetLatestVersionInfo() + { + using(UnityWebRequest webRequest = UnityWebRequest.Get(lilConstants.versionInfoURL)) + { + yield return webRequest.SendWebRequest(); + #if UNITY_2020_2_OR_NEWER + if(webRequest.result != UnityWebRequest.Result.ConnectionError) + #else + if(!webRequest.isNetworkError) + #endif + { + lilEditorParameters.instance.versionInfo = webRequest.downloadHandler.text; + } + } + } + + internal static void MigrateMaterials() + { + EditorApplication.delayCall -= MigrateMaterials; + foreach(var material in lilDirectoryManager.FindAssets("t:material")) + { + MigrateMaterial(material); + } + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + } + + internal static void MigrateMaterial(Material material) + { + if(!lilMaterialUtils.CheckShaderIslilToon(material)) return; + var id = material.shader.GetPropertyNameId(material.shader.FindPropertyIndex("_lilToonVersion")); + int version = 0; + if(material.HasProperty(id)) version = (int)material.GetFloat(id); + if(version >= lilConstants.currentVersionValue) return; + Debug.Log("[lilToon]Run migration: " + material.name); + material.SetFloat(id, lilConstants.currentVersionValue); + + // 1.2.7 -> 1.2.8 + if(version < 21) + { + if(material.shader.name.Contains("_lil/lilToonMulti")) + { + int renderQueue = lilMaterialUtils.GetTrueRenderQueue(material); + material.shader = material.HasProperty("_UseOutline") && material.GetFloat("_UseOutline") != 0.0f ? Shader.Find("Hidden/lilToonMultiOutline") : Shader.Find("_lil/lilToonMulti"); + material.renderQueue = renderQueue; + } + } + } + + private static void PackageVersionChecker(string packageName) + { + int indexlil = packageName.IndexOf("lilToon_"); + if(indexlil < 0) indexlil = packageName.IndexOf("jp.lilxyzw.liltoon-"); + if(indexlil < 0) return; + + if(lilDirectoryManager.GetSettingLockPath().Contains("Packages")) + { + if(!EditorUtility.DisplayDialog("lilToon", lilLanguageManager.GetLoc("sDialogImportPackage"), lilLanguageManager.GetLoc("sYes"), lilLanguageManager.GetLoc("sNo"))) + { + CoroutineHandler.StartStaticCoroutine(ClosePackageImportWindow()); + return; + } + } + + string packageVerString = packageName.Substring(indexlil + 8); + + var semPackage = new SemVerParser(packageVerString, true); + var semCurrent = new SemVerParser(lilConstants.currentVersionName); + if(semPackage == null || semCurrent == null) return; + + if(semPackage < semCurrent) + { + if(!EditorUtility.DisplayDialog("lilToon", lilLanguageManager.GetLoc("sDialogImportOldVer"), lilLanguageManager.GetLoc("sYes"), lilLanguageManager.GetLoc("sNo"))) + { + CoroutineHandler.StartStaticCoroutine(ClosePackageImportWindow()); + return; + } + } + } + + private static IEnumerator ClosePackageImportWindow() + { + var type = typeof(Editor).Assembly.GetType("UnityEditor.PackageImport"); + var method = typeof(EditorWindow).GetMethod("HasOpenInstances", BindingFlags.Static | BindingFlags.Public); + if(method != null) + { + var genmethod = method.MakeGenericMethod(type); + while(!(bool)genmethod.Invoke(null,null)) + { + yield return null; + } + EditorWindow.GetWindow(type).Close(); + } + } + + private static int[] ReadSemVer(string sem) + { + var parts = sem.Split('.'); + if(parts.Length < 3) return null; + int major, minor, patch; + try + { + major = int.Parse(parts[0]); + minor = int.Parse(parts[1]); + patch = int.Parse(parts[2]); + } + catch + { + return null; + } + return new[]{major,minor,patch}; + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // based on CoroutineHandler.cs + // https://github.com/Unity-Technologies/EndlessRunnerSampleGame/blob/master/Assets/Scripts/CoroutineHandler.cs + public class CoroutineHandler : MonoBehaviour + { + protected static CoroutineHandler m_Instance; + public static CoroutineHandler Instance + { + get + { + if(m_Instance == null) + { + var o = new GameObject("CoroutineHandler") + { + hideFlags = HideFlags.HideAndDontSave + }; + m_Instance = o.AddComponent(); + } + + return m_Instance; + } + } + + public void OnDisable() + { + if(m_Instance) Destroy(m_Instance.gameObject); + } + + public static Coroutine StartStaticCoroutine(IEnumerator coroutine) + { + return Instance.StartCoroutine(coroutine); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilStartup.cs.meta b/Assets/External/lilToon/Editor/lilStartup.cs.meta new file mode 100644 index 00000000..37e8a4e6 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilStartup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 285f5fec2e8cdc74db8c86bce70805bd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilTextureUtils.cs b/Assets/External/lilToon/Editor/lilTextureUtils.cs new file mode 100644 index 00000000..b0712c9c --- /dev/null +++ b/Assets/External/lilToon/Editor/lilTextureUtils.cs @@ -0,0 +1,441 @@ +#if UNITY_EDITOR +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +using Object = UnityEngine.Object; + +namespace lilToon +{ + public class lilTextureUtils + { + //------------------------------------------------------------------------------------------------------------------------------ + // Gradient + #region + internal static void GradientEditor(Material material, Gradient ingrad, MaterialProperty texprop, bool setLinear = false) + { + #if UNITY_2018_3_OR_NEWER + ingrad = EditorGUILayout.GradientField(lilLanguageManager.GetLoc("sGradColor"), ingrad); + #else + var setMethod = typeof(EditorGUILayout).GetMethod( + "GradientField", + BindingFlags.NonPublic | BindingFlags.Static, + null, + new [] {typeof(string), typeof(Gradient), typeof(GUILayoutOption[])}, + null); + if(setMethod != null) { + ingrad = (Gradient)setMethod.Invoke(null, new object[]{lilLanguageManager.GetLoc("sGradColor"), ingrad, null});; + } + #endif + GUILayout.BeginHorizontal(); + GUILayout.Space(EditorGUI.indentLevel * 16); + if(GUILayout.Button("Test")) + { + texprop.textureValue = GradientToTexture(ingrad, setLinear); + } + if(GUILayout.Button("Save")) + { + var tex = GradientToTexture(ingrad, setLinear); + tex = SaveTextureToPng(material, tex, texprop.name); + if(setLinear) SetLinear(tex); + texprop.textureValue = tex; + } + GUILayout.EndHorizontal(); + } + + internal static void GradientEditor(Material material, string emissionName, Gradient ingrad, MaterialProperty texprop, bool setLinear = false) + { + ingrad = MaterialToGradient(material, emissionName); + #if UNITY_2018_3_OR_NEWER + ingrad = EditorGUILayout.GradientField(lilLanguageManager.GetLoc("sGradColor"), ingrad); + #else + var setMethod = typeof(EditorGUILayout).GetMethod( + "GradientField", + BindingFlags.NonPublic | BindingFlags.Static, + null, + new [] {typeof(string), typeof(Gradient), typeof(GUILayoutOption[])}, + null); + if(setMethod != null) { + ingrad = (Gradient)setMethod.Invoke(null, new object[]{lilLanguageManager.GetLoc("sGradColor"), ingrad, null});; + } + #endif + GradientToMaterial(material, emissionName, ingrad); + GUILayout.BeginHorizontal(); + GUILayout.Space(EditorGUI.indentLevel * 16); + if(GUILayout.Button("Test")) + { + texprop.textureValue = GradientToTexture(ingrad, setLinear); + } + if(GUILayout.Button("Save")) + { + var tex = GradientToTexture(ingrad, setLinear); + tex = SaveTextureToPng(material, tex, texprop.name); + if(setLinear) SetLinear(tex); + texprop.textureValue = tex; + } + GUILayout.EndHorizontal(); + } + + private static void SetLinear(Texture2D tex) + { + if(tex != null) + { + string path = AssetDatabase.GetAssetPath(tex); + var textureImporter = (TextureImporter)AssetImporter.GetAtPath(path); + textureImporter.sRGBTexture = false; + AssetDatabase.ImportAsset(path); + } + } + + private static Gradient MaterialToGradient(Material material, string emissionName) + { + var outgrad = new Gradient(); + var colorKey = new GradientColorKey[material.GetInt(emissionName + "ci")]; + var alphaKey = new GradientAlphaKey[material.GetInt(emissionName + "ai")]; + for(int i=0;i(path); + GetReadableTexture(ref tex); + if(path.EndsWith(".png", StringComparison.OrdinalIgnoreCase) || + path.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) || + path.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase)) + { + var bytes = File.ReadAllBytes(Path.GetFullPath(path)); + tex.LoadImage(bytes); + } + + if(tex != null) tex.filterMode = FilterMode.Bilinear; + } + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Save Texture + #region + internal static Texture2D SaveTextureToPng(Material material, Texture2D tex, string texname, string customName = "") + { + string path = AssetDatabase.GetAssetPath(material.GetTexture(texname)); + if(string.IsNullOrEmpty(path)) path = AssetDatabase.GetAssetPath(material); + + string filename = Path.GetFileNameWithoutExtension(path); + if(!string.IsNullOrEmpty(customName)) filename += customName; + else filename += "_2"; + if(!string.IsNullOrEmpty(path)) path = EditorUtility.SaveFilePanel("Save Texture", Path.GetDirectoryName(path), filename, "png"); + else path = EditorUtility.SaveFilePanel("Save Texture", "Assets", tex.name + ".png", "png"); + if(!string.IsNullOrEmpty(path)) { + File.WriteAllBytes(path, tex.EncodeToPNG()); + Object.DestroyImmediate(tex); + AssetDatabase.Refresh(); + return AssetDatabase.LoadAssetAtPath(path.Substring(path.IndexOf("Assets"))); + } + else + { + return (Texture2D)material.GetTexture(texname); + } + } + + internal static Texture2D SaveTextureToPng(Texture2D tex, Texture2D origTex) + { + string path = AssetDatabase.GetAssetPath(origTex); + if(!string.IsNullOrEmpty(path)) path = EditorUtility.SaveFilePanel("Save Texture", Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(path)+"_alpha", "png"); + else path = EditorUtility.SaveFilePanel("Save Texture", "Assets", tex.name + "_alpha.png", "png"); + if(!string.IsNullOrEmpty(path)) { + File.WriteAllBytes(path, tex.EncodeToPNG()); + Object.DestroyImmediate(tex); + AssetDatabase.Refresh(); + return AssetDatabase.LoadAssetAtPath(path.Substring(path.IndexOf("Assets"))); + } + else + { + return origTex; + } + } + + internal static Texture2D SaveTextureToPng(Texture2D tex, string path, string customName = "") + { + string filename = customName + Path.GetFileNameWithoutExtension(path); + if(!string.IsNullOrEmpty(path)) path = EditorUtility.SaveFilePanel("Save Texture", Path.GetDirectoryName(path), filename, "png"); + else path = EditorUtility.SaveFilePanel("Save Texture", "Assets", filename, "png"); + if(!string.IsNullOrEmpty(path)) + { + File.WriteAllBytes(path, tex.EncodeToPNG()); + Object.DestroyImmediate(tex); + AssetDatabase.Refresh(); + return AssetDatabase.LoadAssetAtPath(path.Substring(path.IndexOf("Assets"))); + } + else + { + return tex; + } + } + + public static string SaveTextureToPng(string path, string add, Texture2D tex) + { + string savePath = Path.GetDirectoryName(path) + "/" + Path.GetFileNameWithoutExtension(path) + add + ".png"; + File.WriteAllBytes(savePath, tex.EncodeToPNG()); + return savePath; + } + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Gif to Atlas + #region + #if SYSTEM_DRAWING + public static string ConvertGifToAtlas(Object tex) + { + int frameCount, loopXY, duration; + float xScale, yScale; + return ConvertGifToAtlas(tex, out frameCount, out loopXY, out duration, out xScale, out yScale); + } + + public static string ConvertGifToAtlas(Object tex, out int frameCount, out int loopXY, out int duration, out float xScale, out float yScale) + { + string path = AssetDatabase.GetAssetPath(tex); + var origGif = System.Drawing.Image.FromFile(path); + var dimension = new System.Drawing.Imaging.FrameDimension(origGif.FrameDimensionsList[0]); + frameCount = origGif.GetFrameCount(dimension); + loopXY = Mathf.CeilToInt(Mathf.Sqrt(frameCount)); + duration = BitConverter.ToInt32(origGif.GetPropertyItem(20736).Value, 0); + int finalWidth = 1; + int finalHeight = 1; + if(EditorUtility.DisplayDialog(lilLanguageManager.GetLoc("sDialogGifToAtlas"), lilLanguageManager.GetLoc("sUtilGif2AtlasPow2"), lilLanguageManager.GetLoc("sYes"), lilLanguageManager.GetLoc("sNo"))) + { + while(finalWidth < origGif.Width * loopXY) finalWidth *= 2; + while(finalHeight < origGif.Height * loopXY) finalHeight *= 2; + } + else + { + finalWidth = origGif.Width * loopXY; + finalHeight = origGif.Height * loopXY; + } + var atlasTexture = new Texture2D(finalWidth, finalHeight); + xScale = (float)(origGif.Width * loopXY) / finalWidth; + yScale = (float)(origGif.Height * loopXY) / finalHeight; + for(int x = 0; x < finalWidth; x++) + { + for(int y = 0; y < finalHeight; y++) + { + atlasTexture.SetPixel(x, finalHeight - 1 - y, Color.clear); + } + } + for(int i = 0; i < frameCount; i++) + { + int offsetX = i%loopXY; + int offsetY = Mathf.FloorToInt(i/loopXY); + origGif.SelectActiveFrame(dimension, i); + var frame = new System.Drawing.Bitmap(origGif.Width, origGif.Height); + System.Drawing.Graphics.FromImage(frame).DrawImage(origGif, System.Drawing.Point.Empty); + + for(int x = 0; x < frame.Width; x++) + { + for(int y = 0; y < frame.Height; y++) + { + var sourceColor = frame.GetPixel(x, y); + atlasTexture.SetPixel(x + (frame.Width * offsetX), finalHeight - (frame.Height * offsetY) - 1 - y, new Color32(sourceColor.R, sourceColor.G, sourceColor.B, sourceColor.A)); + } + } + } + atlasTexture.Apply(); + + // Save + string savePath = SaveTextureToPng(path, "_gif2png_" + loopXY + "_" + frameCount + "_" + duration, atlasTexture); + AssetDatabase.Refresh(); + return savePath; + } + #else + public static string ConvertGifToAtlas(Object tex) + { + int frameCount, loopXY, duration; + float xScale, yScale; + return ConvertGifToAtlas(tex, out frameCount, out loopXY, out duration, out xScale, out yScale); + } + + public static string ConvertGifToAtlas(Object tex, out int frameCount, out int loopXY, out int duration, out float xScale, out float yScale) + { + frameCount = 0; + loopXY = 0; + duration = 0; + xScale = 1.0f; + yScale = 1.0f; + return ""; + } + #endif + #endregion + + //------------------------------------------------------------------------------------------------------------------------------ + // Cube to PNG + #region + private static Texture3D ReadCube(string path) + { + int size = -1; + var sr = new StreamReader(path); + string line; + var colors = new List(); + while((line = sr.ReadLine()) != null) + { + line = line.Trim(); + int c = line.IndexOf("#"); + if(c >= 0) line = line.Substring(0, c); + + if(line.StartsWith("TITLE") || line.StartsWith("DOMAIN_")) continue; + if(line.StartsWith("LUT_3D_SIZE")) + { + try + { + size = int.Parse(line.Substring(11).TrimStart()); + } + catch(Exception e) + { + Debug.LogException(e); + sr.Close(); + return null; + } + continue; + } + var vals = line.Split(); + if(vals.Length != 3) continue; + try + { + colors.Add(new Color( + float.Parse(vals[0], CultureInfo.InvariantCulture), + float.Parse(vals[1], CultureInfo.InvariantCulture), + float.Parse(vals[2], CultureInfo.InvariantCulture) + )); + } + catch(Exception e) + { + Debug.LogException(e); + sr.Close(); + return null; + } + } + sr.Close(); + if(size <= 0 || colors == null || colors.Count < size*size*size) return null; + + var tex = new Texture3D(size, size, size, TextureFormat.RGBA32, false); + tex.SetPixels(colors.GetRange(0,size*size*size).ToArray()); + tex.Apply(); + return tex; + } + + internal static Texture2D ConvertLUT3Dto2D(Texture3D tex) + { + int resX = 16; + int resY = 1; + int width = resX * resY * resX; + int height = resX * resY * resY; + + var material = new Material(lilShaderManager.ltsbaker); + material.SetTexture("_MainTex3D", tex); + material.SetFloat("_ResX", resX); + material.SetFloat("_ResY", resY); + material.EnableKeyword("_LUT3D_TO_2D"); + + var outTexture = new Texture2D(width, height, TextureFormat.RGBA32, false); + + var bufRT = RenderTexture.active; + var srcTexture = RenderTexture.GetTemporary(width, height); + var dstTexture = RenderTexture.GetTemporary(width, height); + Graphics.Blit(srcTexture, dstTexture, material); + RenderTexture.active = dstTexture; + outTexture.ReadPixels(new Rect(0, 0, width, height), 0, 0); + outTexture.Apply(); + RenderTexture.active = bufRT; + RenderTexture.ReleaseTemporary(dstTexture); + + return outTexture; + } + + internal static void ConvertLUTToPNG(Object obj) + { + string path = AssetDatabase.GetAssetPath(obj); + Texture3D texOrig = null; + if(path.EndsWith(".cube")) texOrig = ReadCube(path); + if(texOrig == null) + { + EditorUtility.DisplayDialog("[lilToon] Convert LUT to PNG", lilLanguageManager.GetLoc("sUtilInvalidFormat"), lilLanguageManager.GetLoc("sOK")); + return; + } + var tex = ConvertLUT3Dto2D(texOrig); + SaveTextureToPng(path, "_conv", tex); + AssetDatabase.Refresh(); + } + #endregion + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilTextureUtils.cs.meta b/Assets/External/lilToon/Editor/lilTextureUtils.cs.meta new file mode 100644 index 00000000..de58308a --- /dev/null +++ b/Assets/External/lilToon/Editor/lilTextureUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e753050b495ae6e4faa372fc78a4b7e8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilToon.Editor.asmdef b/Assets/External/lilToon/Editor/lilToon.Editor.asmdef new file mode 100644 index 00000000..a445f391 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToon.Editor.asmdef @@ -0,0 +1,28 @@ +{ + "name": "lilToon.Editor", + "includePlatforms": [ + "Editor" + ], + "versionDefines": [ + { + "name": "com.vrchat.avatars", + "expression": "", + "define": "LILTOON_VRCSDK3_AVATARS" + }, + { + "name": "com.vrchat.worlds", + "expression": "", + "define": "LILTOON_VRCSDK3_WORLDS" + }, + { + "name": "com.vrchat.base", + "expression": "", + "define": "LILTOON_VRCSDK3" + }, + { + "name": "at.pimaker.ltcgi", + "expression": "1.4", + "define": "LILTOON_LTCGI" + } + ] +} diff --git a/Assets/External/lilToon/Editor/lilToon.Editor.asmdef.meta b/Assets/External/lilToon/Editor/lilToon.Editor.asmdef.meta new file mode 100644 index 00000000..f8628392 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToon.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e7f0f8dffe955d640bbc76d1d4f4986e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs b/Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs new file mode 100644 index 00000000..2b30b472 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs @@ -0,0 +1,27 @@ +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; + +namespace lilToon +{ + internal class lilToonAssetPostprocessor : AssetPostprocessor + { + static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) + { + var id = Shader.PropertyToID("_lilToonVersion"); + foreach(var path in importedAssets) + { + if(!path.EndsWith(".mat")) continue; + var material = AssetDatabase.LoadAssetAtPath(path); + if(!lilMaterialUtils.CheckShaderIslilToon(material)) continue; + + lilStartup.MigrateMaterial(material); + if(material.shader.name.Contains("Multi")) + { + lilMaterialUtils.SetupMultiMaterial(material); + } + } + } + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs.meta b/Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs.meta new file mode 100644 index 00000000..95e696dd --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonAssetPostprocessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21405dfa11118c942a590c0eaa7f57ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilToonEditorUtils.cs b/Assets/External/lilToon/Editor/lilToonEditorUtils.cs new file mode 100644 index 00000000..5ecd2bbd --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonEditorUtils.cs @@ -0,0 +1,761 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEditor.Build; +using UnityEditor.Rendering; +using UnityEngine; +using UnityEngine.Rendering; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +using Object = UnityEngine.Object; +using System.Text; +using System.Reflection; + +namespace lilToon +{ + public static class lilToonEditorUtils + { + #pragma warning disable CS0612 + //------------------------------------------------------------------------------------------------------------------------------ + // Constant + private const string menuPathAssets = "Assets/lilToon/"; + private const string menuPathGameObject = "GameObject/lilToon/"; + private const string menuPathRefreshShaders = menuPathAssets + "[Shader] Refresh shaders"; + private const string menuPathRemoveUnusedProperties = menuPathAssets + "[Material] Remove unused properties"; + private const string menuPathRunMigration = menuPathAssets + "[Material] Run migration"; + private const string menuPathConvertNormal = menuPathAssets + "[Texture] Convert normal map (DirectX <-> OpenGL)"; + private const string menuPathPixelArtReduction = menuPathAssets + "[Texture] Pixel art reduction"; + private const string menuPathConvertGifToAtlas = menuPathAssets + "[Texture] Convert Gif to Atlas"; + private const string menuPathConvertLUTToPNG = menuPathAssets + "[Texture] Convert LUT to PNG"; + private const string menuPathSetupFromFBX = menuPathAssets + "[Model] Setup from FBX"; + private const string menuPathFixLighting = menuPathGameObject + "[GameObject] Fix lighting"; + + private const int menuPriorityAssets = 1100; + private const int menuPriorityGameObject = 21; // This must be 21 or less + private const int menuPriorityRefreshShaders = menuPriorityAssets + 0; + private const int menuPriorityRemoveUnusedProperties = menuPriorityAssets + 20; + private const int menuPriorityRunMigration = menuPriorityAssets + 21; + private const int menuPriorityConvertNormal = menuPriorityAssets + 22; + private const int menuPriorityPixelArtReduction = menuPriorityAssets + 23; + private const int menuPriorityConvertGifToAtlas = menuPriorityAssets + 24; + private const int menuPriorityConvertLUTToPNG = menuPriorityAssets + 25; + private const int menuPrioritySetupFromFBX = menuPriorityAssets + 26; + private const int menuPriorityFixLighting = menuPriorityGameObject; + + private const string anchorName = "AutoAnchorObject"; + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Refresh shaders + [MenuItem(menuPathRefreshShaders, false, menuPriorityRefreshShaders)] + private static void RefreshShaders() + { + lilEditorParameters.instance.modifiedShaders = ""; + lilToonSetting shaderSetting = null; + lilToonSetting.InitializeShaderSetting(ref shaderSetting); + if(shaderSetting.isDebugOptimize) + { + lilToonSetting.ApplyShaderSettingOptimized(); + return; + } + if(lilShaderAPI.IsTextureLimitedAPI()) + { + lilToonSetting.TurnOffAllShaderSetting(ref shaderSetting); + lilToonSetting.CheckTextures(ref shaderSetting); + } + + lilToonSetting.TurnOnAllShaderSetting(ref shaderSetting); + lilToonSetting.ApplyShaderSetting(shaderSetting); + + AssetDatabase.Refresh(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Remove unused properties + [MenuItem(menuPathRemoveUnusedProperties, false, menuPriorityRemoveUnusedProperties)] + private static void RemoveUnusedProperties() + { + if(Selection.objects.Length == 0) return; + Undo.RecordObjects(Selection.objects, "Remove unused properties"); + foreach(var m in Selection.objects.Where(o => o is Material).Select(o => (Material)o)) + { + lilMaterialUtils.RemoveUnusedTexture(m); + } + } + + [MenuItem(menuPathRemoveUnusedProperties, true, menuPriorityRemoveUnusedProperties)] + private static bool CheckRemoveUnusedProperties() + { + return CheckExtension(".mat"); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Run migration + [MenuItem(menuPathRunMigration, false, menuPriorityRunMigration)] + private static void RunMigration() + { + lilStartup.MigrateMaterials(); + EditorUtility.DisplayDialog("[lilToon] Run migration",GetLoc("sComplete"),GetLoc("sOK")); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Convert normal map (DirectX <-> OpenGL) + [MenuItem(menuPathConvertNormal, false, menuPriorityConvertNormal)] + private static void ConvertNormal() + { + var srcTexture = new Texture2D(2, 2, TextureFormat.ARGB32, true, true); + var hsvgMaterial = new Material(Shader.Find("Hidden/ltsother_baker")); + string path = AssetDatabase.GetAssetPath(Selection.activeObject); + lilTextureUtils.LoadTexture(ref srcTexture, path); + hsvgMaterial.SetTexture("_MainTex", srcTexture); + hsvgMaterial.EnableKeyword("_NORMAL_DXGL"); + + Texture2D outTexture = null; + lilToonInspector.RunBake(ref outTexture, srcTexture, hsvgMaterial); + + // Save + lilTextureUtils.SaveTextureToPng(path, "_conv", outTexture); + AssetDatabase.Refresh(); + + Object.DestroyImmediate(hsvgMaterial); + Object.DestroyImmediate(srcTexture); + } + + [MenuItem(menuPathConvertNormal, true, menuPriorityConvertNormal)] + private static bool CheckConvertNormal() + { + return CheckImageExtension(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Convert Gif to Atlas + #if SYSTEM_DRAWING + // Gif to Atlas + [MenuItem(menuPathConvertGifToAtlas, false, menuPriorityConvertGifToAtlas)] + private static void ConvertGifToAtlas() + { + lilTextureUtils.ConvertGifToAtlas(Selection.activeObject); + } + + [MenuItem(menuPathConvertGifToAtlas, true, menuPriorityConvertGifToAtlas)] + private static bool CheckConvertGifToAtlas() + { + return CheckExtension(".gif"); + } + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Convert LUT to PNG + [MenuItem(menuPathConvertLUTToPNG, false, menuPriorityConvertLUTToPNG)] + private static void ConvertLUTToPNG() + { + foreach(var o in Selection.objects) + { + lilTextureUtils.ConvertLUTToPNG(o); + } + } + + [MenuItem(menuPathConvertLUTToPNG, true, menuPriorityConvertLUTToPNG)] + private static bool CheckConvertLUTToPNG() + { + return CheckExtension(".cube"); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Dot texture reduction + [MenuItem(menuPathPixelArtReduction, false, menuPriorityPixelArtReduction)] + private static void PixelArtReduction() + { + var srcTexture = new Texture2D(2, 2); + string path = AssetDatabase.GetAssetPath(Selection.activeObject); + var bytes = File.ReadAllBytes(Path.GetFullPath(path)); + srcTexture.LoadImage(bytes); + lilTextureUtils.LoadTexture(ref srcTexture, path); + int finalWidth; + int finalHeight; + int scale; + if(EditorUtility.DisplayDialog("Dot Texture reduction",GetLoc("sUtilDotTexRedRatio"),"1/2","1/4")) + { + finalWidth = srcTexture.width / 2; + finalHeight = srcTexture.height / 2; + scale = 2; + } + else + { + finalWidth = srcTexture.width / 4; + finalHeight = srcTexture.height / 4; + scale = 4; + } + var outTex = new Texture2D(finalWidth, finalHeight); + for(int x = 0; x < finalWidth; x++) + { + for(int y = 0; y < finalHeight; y++) + { + outTex.SetPixel(x, y, srcTexture.GetPixel(x*scale, y*scale)); + } + } + outTex.Apply(); + + // Save + string savePath = lilTextureUtils.SaveTextureToPng(path, "_resized", outTex); + AssetDatabase.Refresh(); + var textureImporter = (TextureImporter)AssetImporter.GetAtPath(savePath); + textureImporter.filterMode = FilterMode.Point; + AssetDatabase.ImportAsset(savePath); + } + + [MenuItem(menuPathPixelArtReduction, true, menuPriorityPixelArtReduction)] + private static bool CheckPixelArtReduction() + { + return CheckImageExtension(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Assets/lilToon/Setup from FBX + [MenuItem(menuPathSetupFromFBX, false, menuPrioritySetupFromFBX)] + private static void SetupFromFBX() + { + if(Selection.objects.Length == 0) return; + var lts = Shader.Find("lilToon"); + if(lts == null) EditorUtility.DisplayDialog("Setup From FBX",GetLoc("sUtilShaderNotFound"),GetLoc("sCancel")); + Undo.RecordObjects(Selection.objects, "Setup From FBX"); + foreach(var selectionObj in Selection.objects) + { + string path = AssetDatabase.GetAssetPath(selectionObj); + if(!path.EndsWith(".fbx", StringComparison.OrdinalIgnoreCase)) continue; + + var importer = (ModelImporter)AssetImporter.GetAtPath(path); + #if UNITY_2019_3_OR_NEWER + importer.materialImportMode = ModelImporterMaterialImportMode.ImportStandard; + #else + importer.importMaterials = true; + #endif + + string dirPath = Path.GetDirectoryName(path); + string materialFolder = dirPath + "/Materials"; + if(!Directory.Exists(materialFolder)) + { + Directory.CreateDirectory(materialFolder); + } + else + { + if(!EditorUtility.DisplayDialog("Setup From FBX",GetLoc("sUtilMaterialAlreadyExist"),GetLoc("sYes"),GetLoc("sNo"))) return; + } + + lilToonSetting shaderSetting = null; + lilToonSetting.InitializeShaderSetting(ref shaderSetting); + + // Materials in SerializedObject + var serializedObject = new SerializedObject(importer); + var serializedObjects = serializedObject.FindProperty("m_ExternalObjects"); + for(int i = 0; i < serializedObjects.arraySize; i++) + { + var serializedMaterial = serializedObjects.GetArrayElementAtIndex(i); + string propType = serializedMaterial.FindPropertyRelative("first.type").stringValue; + if(propType != "UnityEngine:Material") continue; + + var material = (Material)serializedMaterial.FindPropertyRelative("second").objectReferenceValue; + if(material == null) + { + material = new Material(lts) + { + name = serializedMaterial.FindPropertyRelative("first.name").stringValue + }; + } + SetUpMaterial(ref material, materialFolder, shaderSetting); + } + + // Materials in model + foreach(var obj in AssetDatabase.LoadAllAssetsAtPath(path).Where(o => o is Material)) + { + var material = new Material((Material)obj); + SetUpMaterial(ref material, materialFolder, shaderSetting); + } + + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + importer.SearchAndRemapMaterials(ModelImporterMaterialName.BasedOnMaterialName, ModelImporterMaterialSearch.Local); + AssetDatabase.ImportAsset(path); + AssetDatabase.Refresh(); + } + } + + [MenuItem(menuPathSetupFromFBX, true, menuPrioritySetupFromFBX)] + private static bool CheckSetupFromFBX() + { + return CheckExtension(".fbx"); + } + + private static void SetUpMaterial(ref Material material, string materialFolder, lilToonSetting shaderSetting) + { + if(string.IsNullOrEmpty(material.name)) return; + string materialFileName = material.name; + string materialLowerName = material.name.ToLower(); + if(!materialFileName.EndsWith(".mat")) materialFileName += ".mat"; + string materialPath = materialFolder + "/" + materialFileName; + if(File.Exists(materialPath)) + { + material = AssetDatabase.LoadAssetAtPath(materialPath); + } + else + { + AssetDatabase.CreateAsset(material, materialPath); + } + var lts = Shader.Find("lilToon"); + if(lts != null) material.shader = lts; + + if(material.GetTexture("_MainTex") == null) + { + foreach(var tex in lilDirectoryManager.FindAssets("t:texture2d")) + { + string texNameLow = tex.name.ToLower(); + if(!texNameLow.Contains(materialLowerName)) continue; + if(lilMaterialUtils.CheckMainTextureName(texNameLow)) + { + material.SetTexture("_MainTex", tex); + break; + } + } + } + + lilToonPreset presetSkin = null; + lilToonPreset presetFace = null; + lilToonPreset presetHair = null; + lilToonPreset presetCloth = null; + + if(shaderSetting != null) + { + presetSkin = shaderSetting.presetSkin; + presetFace = shaderSetting.presetFace; + presetHair = shaderSetting.presetHair; + presetCloth = shaderSetting.presetCloth; + } + + if(presetSkin == null) presetSkin = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath("44e146d270da72d4cb21a0a3b8658d1a")); + if(presetFace == null) presetFace = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath("125301c732c00f84091ef099d83833b7")); + if(presetHair == null) presetHair = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath("b66bf1309c6d60847ae978e0a54ac5fa")); + if(presetCloth == null) presetCloth = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath("193de7d9d533d4841842d8c5ed740259")); + if(materialLowerName.Contains("face")) lilToonPreset.ApplyPreset(material, presetFace, false); + else if(materialLowerName.Contains("body") || materialLowerName.Contains("skin")) lilToonPreset.ApplyPreset(material, presetSkin, false); + else if(materialLowerName.Contains("hair")) lilToonPreset.ApplyPreset(material, presetHair, false); + else lilToonPreset.ApplyPreset(material, presetCloth, false); + + bool isOutl = material.shader.name.Contains("Outline"); + + if(!material.HasProperty("_ShadowStrengthMask") || material.GetTexture("_ShadowStrengthMask") == null) + { + foreach(var tex in lilDirectoryManager.FindAssets("t:texture2d")) + { + string texNameLow = tex.name.ToLower(); + if(!texNameLow.Contains(materialLowerName)) continue; + if((texNameLow.Contains("shadow") || texNameLow.Contains("shade")) && (texNameLow.Contains("mask") || texNameLow.Contains("strength"))) + { + material.SetTexture("_ShadowStrengthMask", tex); + break; + } + } + } + + if(isOutl && (!material.HasProperty("_OutlineWidthMask") || material.GetTexture("_OutlineWidthMask") == null)) + { + foreach(var tex in lilDirectoryManager.FindAssets("t:texture2d")) + { + string texNameLow = tex.name.ToLower(); + if(texNameLow.Contains(materialLowerName) && texNameLow.Contains("outline")) + { + material.SetTexture("_OutlineWidthMask", tex); + break; + } + } + } + + string mainTexLowerName = ""; + if(material.GetTexture("_MainTex") != null) mainTexLowerName = material.GetTexture("_MainTex").name.ToLower(); + + if(materialLowerName.Contains("cutout") || mainTexLowerName.Contains("cutout")) + { + lilMaterialUtils.SetupMaterialWithRenderingMode(material, RenderingMode.Cutout, TransparentMode.Normal, isOutl, false, false, false); + } + else if(materialLowerName.Contains("alpha") || mainTexLowerName.Contains("alpha") || materialLowerName.Contains("fade") || mainTexLowerName.Contains("fade") || materialLowerName.Contains("transparent") || mainTexLowerName.Contains("transparent")) + { + lilMaterialUtils.SetupMaterialWithRenderingMode(material, RenderingMode.Transparent, TransparentMode.Normal, isOutl, false, false, false); + } + + EditorUtility.SetDirty(material); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // GameObject/[lilToon] Fix lighting + [MenuItem(menuPathFixLighting, false, menuPriorityFixLighting)] + private static void FixLighting() + { + var gameObject = Selection.activeGameObject; + var anchorTransform = gameObject.transform.Find(anchorName); + var anchorObject = anchorTransform != null ? anchorTransform.gameObject : null; + var meshRenderers = gameObject.GetComponentsInChildren(true); + var skinnedMeshRenderers = gameObject.GetComponentsInChildren(true); + + var recordObjects = new List{gameObject}; + recordObjects.AddRange(meshRenderers); + recordObjects.AddRange(skinnedMeshRenderers); + + // Create Anchor + if(anchorObject == null) + { + anchorObject = new GameObject(anchorName); + } + recordObjects.Add(anchorObject); + Undo.RecordObjects(recordObjects.ToArray(), "[lilToon] Fix lighting"); + + // Calculate avatar size + float minX = 10000.0f; + float minY = 10000.0f; + float minZ = 10000.0f; + float maxX = -10000.0f; + float maxY = -10000.0f; + float maxZ = -10000.0f; + //foreach(var objTransform in gameObject.GetComponentsInChildren(true)) + foreach(var objTransform in skinnedMeshRenderers.SelectMany(s=>s.bones).Union(meshRenderers.Select(m=>m.transform)).Where(t=>t!=null)) + { + minX = minX < objTransform.position.x ? minX : objTransform.position.x; + minY = minY < objTransform.position.y ? minY : objTransform.position.y; + minZ = minZ < objTransform.position.z ? minZ : objTransform.position.z; + maxX = maxX > objTransform.position.x ? maxX : objTransform.position.x; + maxY = maxY > objTransform.position.y ? maxY : objTransform.position.y; + maxZ = maxZ > objTransform.position.z ? maxZ : objTransform.position.z; + } + + var centerPosition = new Vector3((minX + maxX) / 2.0f, (minY + maxY) / 2.0f, (minZ + maxZ) / 2.0f); + + anchorObject.transform.position = new Vector3(gameObject.transform.position.x, centerPosition.y, gameObject.transform.position.z); + anchorObject.transform.parent = gameObject.transform; + + minX -= anchorObject.transform.position.x; + minY -= anchorObject.transform.position.y; + minZ -= anchorObject.transform.position.z; + maxX -= anchorObject.transform.position.x; + maxY -= anchorObject.transform.position.y; + maxZ -= anchorObject.transform.position.z; + + float avatarWidth = -minX; + avatarWidth = -minY > avatarWidth ? -minY : avatarWidth; + avatarWidth = -minZ > avatarWidth ? -minZ : avatarWidth; + avatarWidth = maxX > avatarWidth ? maxX : avatarWidth; + avatarWidth = maxY > avatarWidth ? maxY : avatarWidth; + avatarWidth = maxZ > avatarWidth ? maxZ : avatarWidth; + avatarWidth *= 2.5f; + + lilToonSetting shaderSetting = null; + lilToonSetting.InitializeShaderSetting(ref shaderSetting); + + // MeshRenderer + if(meshRenderers.Length != 0) + { + foreach(var meshRenderer in meshRenderers) + { + // Fix vertex light + foreach(var material in meshRenderer.sharedMaterials.Where(m => lilMaterialUtils.CheckShaderIslilToon(m) && shaderSetting != null)) + { + Undo.RecordObject(material, "[lilToon] Fix lighting"); + material.SetFloat("_AsUnlit", shaderSetting.defaultAsUnlit); + material.SetFloat("_VertexLightStrength", shaderSetting.defaultVertexLightStrength); + material.SetFloat("_LightMinLimit", shaderSetting.defaultLightMinLimit); + material.SetFloat("_LightMaxLimit", shaderSetting.defaultLightMaxLimit); + material.SetFloat("_BeforeExposureLimit", shaderSetting.defaultBeforeExposureLimit); + material.SetFloat("_MonochromeLighting", shaderSetting.defaultMonochromeLighting); + material.SetFloat("_lilDirectionalLightStrength", shaderSetting.defaultlilDirectionalLightStrength); + EditorUtility.SetDirty(material); + } + + // Fix renderer settings + meshRenderer.probeAnchor = anchorObject.transform; + meshRenderer.lightProbeUsage = LightProbeUsage.BlendProbes; + meshRenderer.reflectionProbeUsage = ReflectionProbeUsage.BlendProbes; + if(meshRenderer.shadowCastingMode == ShadowCastingMode.Off) + { + meshRenderer.shadowCastingMode = ShadowCastingMode.On; + } + } + } + + // SkinnedMeshRenderer + if(skinnedMeshRenderers.Length != 0) + { + foreach(var skinnedMeshRenderer in skinnedMeshRenderers) + { + // Fix vertex light + foreach(var material in skinnedMeshRenderer.sharedMaterials.Where(m => lilMaterialUtils.CheckShaderIslilToon(m) && shaderSetting != null)) + { + Undo.RecordObject(material, "[lilToon] Fix lighting"); + material.SetFloat("_AsUnlit", shaderSetting.defaultAsUnlit); + material.SetFloat("_VertexLightStrength", shaderSetting.defaultVertexLightStrength); + material.SetFloat("_LightMinLimit", shaderSetting.defaultLightMinLimit); + material.SetFloat("_LightMaxLimit", shaderSetting.defaultLightMaxLimit); + material.SetFloat("_BeforeExposureLimit", shaderSetting.defaultBeforeExposureLimit); + material.SetFloat("_MonochromeLighting", shaderSetting.defaultMonochromeLighting); + material.SetFloat("_lilDirectionalLightStrength", shaderSetting.defaultlilDirectionalLightStrength); + EditorUtility.SetDirty(material); + } + + // Fix renderer settings + skinnedMeshRenderer.probeAnchor = anchorObject.transform; + skinnedMeshRenderer.lightProbeUsage = LightProbeUsage.BlendProbes; + skinnedMeshRenderer.reflectionProbeUsage = ReflectionProbeUsage.BlendProbes; + if(skinnedMeshRenderer.shadowCastingMode == ShadowCastingMode.Off) + { + skinnedMeshRenderer.shadowCastingMode = ShadowCastingMode.On; + } + + // Fix bounds + if(skinnedMeshRenderer.gameObject.GetComponent() == null && skinnedMeshRenderer.bones != null && skinnedMeshRenderer.bones.Length != 0) + { + skinnedMeshRenderer.rootBone = anchorObject.transform; + skinnedMeshRenderer.localBounds = new Bounds(new Vector3(0, 0, 0), new Vector3(avatarWidth, avatarWidth, avatarWidth)); + } + } + } + + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + EditorUtility.DisplayDialog("[lilToon] Fix Lighting",GetLoc("sComplete"),GetLoc("sOK")); + } + + [MenuItem(menuPathFixLighting, true, menuPriorityFixLighting)] + private static bool CheckFixLighting() + { + return Selection.activeGameObject != null; + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Debug + [MenuItem("GameObject/lilToon/[Debug] Generate bug report", false, 22)] + public static void GenerateBugReport() + { + GenerateBugReport(null, null, null); + } + + internal static void GenerateBugReport(List materialsIn, List clipsIn, string addText) + { + var sb = new StringBuilder(); + + sb.AppendLine("# Shader Information"); + sb.AppendLine("lilToon " + lilConstants.currentVersionName); + sb.AppendLine(); + + if(!string.IsNullOrEmpty(addText)) + { + sb.AppendLine(addText); + sb.AppendLine(); + } + sb.AppendLine("# Platform Information"); + sb.AppendLine("Unity: " + Application.unityVersion); + sb.AppendLine("Platform: " + Application.platform.ToString()); + sb.AppendLine("Language: " + Application.systemLanguage.ToString()); + sb.AppendLine("Shader API: " + SystemInfo.graphicsDeviceType.ToString()); + sb.AppendLine(); + + sb.AppendLine("# Editor Settings"); + foreach(var prop in typeof(EditorSettings).GetProperties(BindingFlags.Static | BindingFlags.Public)) + { + sb.AppendLine("EditorSettings." + prop.Name + " = " + prop.GetValue(null,null) + ";"); + } + sb.AppendLine(); + + sb.AppendLine("# Graphics Settings"); + foreach(var prop in typeof(GraphicsSettings).GetProperties(BindingFlags.Static | BindingFlags.Public)) + { + sb.AppendLine("GraphicsSettings." + prop.Name + " = " + prop.GetValue(null,null) + ";"); + } + sb.AppendLine(); + + sb.AppendLine("# Tier Settings"); + sb.AppendLine("Active Tier: " + Graphics.activeTier); + foreach(var prop in typeof(TierSettings).GetProperties(BindingFlags.Static | BindingFlags.Public)) + { + sb.AppendLine("TierSettings." + prop.Name + " = " + prop.GetValue(null,null) + ";"); + } + sb.AppendLine(); + + var buildTarget = EditorUserBuildSettings.activeBuildTarget; + var buildTargetGroup = BuildPipeline.GetBuildTargetGroup(buildTarget); + #if UNITY_2021_3_OR_NEWER + var namedBuildTarget = NamedBuildTarget.FromBuildTargetGroup(buildTargetGroup); + var scriptingDefineSymbols = PlayerSettings.GetScriptingDefineSymbols(namedBuildTarget); + #else + var namedBuildTarget = buildTargetGroup; + var scriptingDefineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildTargetGroup); + #endif + + sb.AppendLine("# Player Settings"); + sb.AppendLine("Color Space: " + PlayerSettings.colorSpace.ToString()); + sb.AppendLine("Graphics APIs: "); + foreach(var api in PlayerSettings.GetGraphicsAPIs(buildTarget)) + { + sb.AppendLine(" " + api.ToString()); + } + sb.AppendLine("Scripting Backend: " + PlayerSettings.GetScriptingBackend(namedBuildTarget)); + sb.AppendLine("Api Compatibility Level: " + PlayerSettings.GetApiCompatibilityLevel(namedBuildTarget)); + sb.AppendLine("C++ Compiler Configuration: " + PlayerSettings.GetIl2CppCompilerConfiguration(namedBuildTarget)); + sb.AppendLine("Scripting Define Symbols: " + scriptingDefineSymbols); + sb.AppendLine(); + + sb.AppendLine("# Quality Settings"); + foreach(var prop in typeof(QualitySettings).GetProperties(BindingFlags.Static | BindingFlags.Public)) + { + sb.AppendLine("QualitySettings." + prop.Name + " = " + prop.GetValue(null,null) + ";"); + } + sb.AppendLine(); + + sb.AppendLine("# SRP Information"); + if(GraphicsSettings.renderPipelineAsset != null) + { + sb.AppendLine("Current RP: " + GraphicsSettings.renderPipelineAsset.ToString()); + } + else + { + sb.AppendLine("Current RP: " + "Built-in Render Pipeline"); + } + string versionURP = ReadVersion("30648b8d550465f4bb77f1e1afd0b37d"); + if(versionURP != null) sb.AppendLine("URP: " + versionURP); + string versionHDRP = ReadVersion("6f54db4299717fc4ca37866c6afa0905"); + if(versionHDRP != null) sb.AppendLine("HDRP: " + versionHDRP); + sb.AppendLine(); + + sb.AppendLine("# VRCSDK Information"); + #if UDON + sb.AppendLine("UDON defined"); + #endif + string versionVRCSDKBase = ReadVersion("1f872e4d36d785e409479da1c5fcde4c"); + if(versionVRCSDKBase != null) sb.AppendLine("VRChat SDK - Base: " + versionVRCSDKBase); + string versionVRCSDKAvatars = ReadVersion("bd7510fb5fa478f43a81e9c74b72cb6f"); + if(versionVRCSDKAvatars != null) sb.AppendLine("VRChat SDK - Avatars: " + versionVRCSDKAvatars); + string versionVRCSDKWorlds = ReadVersion("067f9b5cc16a52649985a5947e355556"); + if(versionVRCSDKWorlds != null) sb.AppendLine("VRChat SDK - Worlds: " + versionVRCSDKWorlds); + string versionVRCSDKPath = AssetDatabase.GUIDToAssetPath("2cdbe2e71e2c46e48951c13df254e5b1"); + if(!string.IsNullOrEmpty(versionVRCSDKPath)) sb.AppendLine("VRChat SDK - Unitypackage: " + File.ReadAllText(versionVRCSDKPath)); + sb.AppendLine(); + + sb.AppendLine("# CVRCCK Information"); + sb.AppendLine(); + + sb.AppendLine("# GameObject Information"); + List materialList; + List clipList; + if(Selection.activeGameObject == null) + { + materialList = lilDirectoryManager.FindAssets("t:material").ToList(); + clipList = lilDirectoryManager.FindAssets("t:animationclip").ToList(); + } + else + { + materialList = Selection.activeGameObject.GetComponentsInChildren(true).SelectMany(r => r.sharedMaterials).ToList(); + clipList = Selection.activeGameObject.GetComponentsInChildren(true).Where(a => a.runtimeAnimatorController != null).SelectMany(a => a.runtimeAnimatorController.animationClips).ToList(); + var meshRenderers = Selection.activeGameObject.GetComponentsInChildren(true); + var skinnedMeshRenderers = Selection.activeGameObject.GetComponentsInChildren(true); + var animators = Selection.activeGameObject.GetComponentsInChildren(true); + + if(meshRenderers == null) sb.AppendLine("MeshRenderer is not found"); + else sb.AppendLine("MeshRenderer Count: " + meshRenderers.Length); + if(skinnedMeshRenderers == null) sb.AppendLine("SkinnedMeshRenderer is not found"); + else sb.AppendLine("SkinnedMeshRenderer Count: " + skinnedMeshRenderers.Length); + if(animators == null) sb.AppendLine("Animator is not found"); + else sb.AppendLine("Animator Count: " + animators.Length); + } + + if(materialsIn != null) materialList.AddRange(materialsIn); + if(clipsIn != null) clipList.AddRange(clipsIn); + + var materials = materialList.ToArray(); + var clips = clipList.ToArray(); + + if(materials == null) sb.AppendLine("Material is not found"); + else sb.AppendLine("Material Count: " + materials.Length); + if(clips == null) sb.AppendLine("AnimationClip is not found"); + else sb.AppendLine("AnimationClip Count: " + clips.Length); + sb.AppendLine(); + + string usedShaders, optimizedHLSL, shaderSettingText; + lilToonSetting.GetOptimizedSetting(materials, clips, out usedShaders, out optimizedHLSL, out shaderSettingText); + + sb.AppendLine("# Shader List"); + if(!string.IsNullOrEmpty(usedShaders)) sb.AppendLine(usedShaders); + else sb.AppendLine("Shader is not found"); + sb.AppendLine(); + + sb.AppendLine("# Shader Setting"); + if(!string.IsNullOrEmpty(shaderSettingText)) sb.AppendLine(shaderSettingText); + else sb.AppendLine("Shader setting is empty"); + sb.AppendLine(); + + sb.AppendLine("# Optimized Input HLSL"); + if(!string.IsNullOrEmpty(optimizedHLSL)) sb.AppendLine(optimizedHLSL); + else sb.AppendLine("Optimization is failed"); + sb.AppendLine(); + + string date = DateTime.Now.ToString("yyyy-MM-dd_HH.mm.ss"); + string path = EditorUtility.SaveFilePanel("Save Bug Report", "", "lilToonBugReport-" + date, "txt"); + if(string.IsNullOrEmpty(path)) return; + var sw = new StreamWriter(path, false); + sw.Write(sb.ToString()); + sw.Close(); + } + + private static string ReadVersion(string guid) + { + string path = AssetDatabase.GUIDToAssetPath(guid); + if(!string.IsNullOrEmpty(path)) + { + var package = JsonUtility.FromJson(File.ReadAllText(path)); + return package.version; + } + return null; + } + + private class PackageInfos + { + public string version = ""; + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Format checker + private static bool CheckExtension(string extension) + { + if(Selection.activeObject == null) return false; + return AssetDatabase.GetAssetPath(Selection.activeObject).EndsWith(extension, StringComparison.OrdinalIgnoreCase); + } + + private static bool CheckImageExtension() + { + if(Selection.activeObject == null) return false; + string assetPath = AssetDatabase.GetAssetPath(Selection.activeObject); + return assetPath.EndsWith(".png", StringComparison.OrdinalIgnoreCase) || + assetPath.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) || + assetPath.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase); + } + + #pragma warning restore CS0612 + [Obsolete] public static string GetLoc(string value) { return lilLanguageManager.GetLoc(value); } + } + +#if LILTOON_DISABLE_ASSET_MODIFICATION == false + public class lilToonBuildProcessor : IPreprocessBuildWithReport, IPostprocessBuildWithReport + { + public int callbackOrder { get { return 100; } } + + public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report) + { + lilToonSetting.SetShaderSettingBeforeBuild(); + EditorApplication.delayCall -= lilToonSetting.SetShaderSettingAfterBuild; + EditorApplication.delayCall += lilToonSetting.SetShaderSettingAfterBuild; + } + + public void OnPostprocessBuild(UnityEditor.Build.Reporting.BuildReport report) + { + lilToonSetting.SetShaderSettingAfterBuild(); + } + } +#endif //LILTOON_DISABLE_ASSET_MODIFICATION +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilToonEditorUtils.cs.meta b/Assets/External/lilToon/Editor/lilToonEditorUtils.cs.meta new file mode 100644 index 00000000..327073d7 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonEditorUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5849833bec4d7ba46bb9aa428ea3c8e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilToonPreset.cs b/Assets/External/lilToon/Editor/lilToonPreset.cs new file mode 100644 index 00000000..7c056699 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonPreset.cs @@ -0,0 +1,551 @@ +#if UNITY_EDITOR +using System; +using System.Collections.Generic; +using System.Linq; +using lilToon; +using UnityEditor; +using UnityEngine; + +public class lilToonPreset : ScriptableObject +{ + public lilPresetBase[] bases; + public lilPresetCategory category; + public string renderingMode; + public Shader shader; + public lilPresetColor[] colors; + public lilPresetVector4[] vectors; + public lilPresetFloat[] floats; + public lilPresetTexture[] textures; + public int renderQueue; + public int outline; + public bool outlineMainTex; + public int tessellation; + + [Serializable] + public struct lilPresetBase + { + public string language; + public string name; + } + + [Serializable] + public struct lilPresetColor + { + public string name; + public Color value; + } + + [Serializable] + public struct lilPresetVector4 + { + public string name; + public Vector4 value; + } + + [Serializable] + public struct lilPresetFloat + { + public string name; + public float value; + } + + [Serializable] + public struct lilPresetTexture + { + public string name; + public Texture value; + public Vector2 offset; + public Vector2 scale; + } + + public static void ApplyPreset(Material material, lilToonPreset preset, bool ismulti) + { + if(material == null || preset == null) return; + Undo.RecordObject(material, "Apply Preset"); + foreach(var f in preset.floats.Where(f => f.name == "_StencilPass")) + { + material.SetFloat(f.name, f.value); + } + if(preset.shader != null) material.shader = preset.shader; + bool isoutl = preset.outline == -1 ? material.shader.name.Contains("Outline") : (preset.outline == 1); + bool istess = preset.tessellation == -1 ? material.shader.name.Contains("Tessellation") : (preset.tessellation == 1); + + bool islite = material.shader.name.Contains("Lite"); + bool iscutout = material.shader.name.Contains("Cutout"); + bool istransparent = material.shader.name.Contains("Transparent"); + bool isrefr = material.shader.name.Contains("Refraction"); + bool isblur = material.shader.name.Contains("Blur"); + bool isfur = material.shader.name.Contains("Fur"); + bool isonepass = material.shader.name.Contains("OnePass"); + bool istwopass = material.shader.name.Contains("TwoPass"); + + var renderingMode = RenderingMode.Opaque; + + //if(string.IsNullOrEmpty(preset.renderingMode) || !Enum.TryParse(preset.renderingMode, out renderingMode)) + if(string.IsNullOrEmpty(preset.renderingMode) || !Enum.IsDefined(typeof(RenderingMode), preset.renderingMode)) + { + if(iscutout) renderingMode = RenderingMode.Cutout; + if(istransparent) renderingMode = RenderingMode.Transparent; + if(isrefr) renderingMode = RenderingMode.Refraction; + if(isrefr && isblur) renderingMode = RenderingMode.RefractionBlur; + if(isfur) renderingMode = RenderingMode.Fur; + if(isfur && iscutout) renderingMode = RenderingMode.FurCutout; + if(isfur && istwopass) renderingMode = RenderingMode.FurTwoPass; + } + else + { + renderingMode = (RenderingMode)Enum.Parse(typeof(RenderingMode), preset.renderingMode); + } + + var transparentMode = TransparentMode.Normal; + if(isonepass) transparentMode = TransparentMode.OnePass; + if(!isfur && istwopass) transparentMode = TransparentMode.TwoPass; + + lilMaterialUtils.SetupMaterialWithRenderingMode(material, renderingMode, transparentMode, isoutl, islite, istess, ismulti); + if(preset.renderQueue != -2) material.renderQueue = preset.renderQueue; + + foreach(var c in preset.colors ) material.SetColor(c.name, c.value); + foreach(var v in preset.vectors) material.SetVector(v.name, v.value); + foreach(var f in preset.floats ) material.SetFloat(f.name, f.value); + foreach(var t in preset.textures) + { + material.SetTexture(t.name, t.value); + material.SetTextureOffset(t.name, t.offset); + material.SetTextureScale(t.name, t.scale); + } + + if(preset.outlineMainTex) material.SetTexture("_OutlineTex", material.GetTexture("_MainTex")); + } + + public static lilToonPreset[] LoadPresets() + { + return lilDirectoryManager.FindAssets("t:lilToonPreset").ToArray(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Save Preset Window + #region + public class lilPresetWindow : EditorWindow + { + private Vector2 scrollPosition = Vector2.zero; + + private bool shouldSaveRenderingMode = false; + private bool shouldSaveQueue = false; + private bool shouldSaveMainTex2Outline = false; + + // Feature + private bool shouldSaveBase = true; + private bool shouldSaveLighting = true; + private bool shouldSaveUV = true; + private bool shouldSaveMain = true; + private bool shouldSaveMain2nd = true; + private bool shouldSaveMain3rd = true; + private bool shouldSaveAlphaMask = true; + private bool shouldSaveShadow = true; + private bool shouldSaveEmission = true; + private bool shouldSaveEmission2nd = true; + private bool shouldSaveNormalMap = true; + private bool shouldSaveNormalMap2nd = true; + private bool shouldSaveAnisotropy = true; + private bool shouldSaveRimShade = true; + private bool shouldSaveBacklight = true; + private bool shouldSaveReflection = true; + private bool shouldSaveMatCap = true; + private bool shouldSaveMatCap2nd = true; + private bool shouldSaveRim = true; + private bool shouldSaveGlitter = true; + private bool shouldSaveParallax = true; + private bool shouldSaveDistanceFade = true; + private bool shouldSaveAudioLink = true; + private bool shouldSaveDissolve = true; + private bool shouldSaveRefraction = true; + private bool shouldSaveGem = true; + private bool shouldSaveTessellation = true; + private bool shouldSaveOutline = true; + private bool shouldSaveFur = true; + private bool shouldSaveStencil = true; + private bool shouldSaveRendering = true; + private bool shouldSaveOutlineRendering = true; + private bool shouldSaveFurRendering = true; + + // Texture + private HashSet shouldSaveTexs = new HashSet(); + + private lilToonPreset preset; + private string[] presetName; + private string filename = ""; + private RenderingMode renderingMode; + private bool isOutl = false; + private bool isTess = false; + private bool isShowFeatures = false; + private bool isShowTextures = false; + + #pragma warning disable CS0612 + private void OnGUI() + { + if(!(Selection.activeObject is Material)){ + EditorGUILayout.LabelField(GetLoc("sPresetIsMaterial")); + return; + } + + string[] sCategorys = { GetLoc("sPresetCategorySkin"), + GetLoc("sPresetCategoryHair"), + GetLoc("sPresetCategoryCloth"), + GetLoc("sPresetCategoryNature"), + GetLoc("sPresetCategoryInorganic"), + GetLoc("sPresetCategoryEffect"), + GetLoc("sPresetCategoryOther") }; + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + + var material = (Material)Selection.activeObject; + if(preset == null) preset = CreateInstance(); + + // load language + var langName = lilLanguageManager.langSet.languageNames.Split('\t'); + Array.Resize(ref presetName, langName.Length); + + // Initialize + Array.Resize(ref preset.bases, 0); + Array.Resize(ref preset.colors, 0); + Array.Resize(ref preset.vectors, 0); + Array.Resize(ref preset.floats, 0); + Array.Resize(ref preset.textures, 0); + if(material.shader != null && !string.IsNullOrEmpty(material.shader.name)) + { + isOutl = material.shader.name.Contains("Outline"); + isTess = material.shader.name.Contains("Tessellation"); + renderingMode = RenderingMode.Opaque; + if(material.shader.name.Contains("Cutout")) renderingMode = RenderingMode.Cutout; + if(material.shader.name.Contains("Transparent")) renderingMode = RenderingMode.Transparent; + if(material.shader.name.Contains("Refraction")) renderingMode = RenderingMode.Refraction; + if(material.shader.name.Contains("RefractionBlur")) renderingMode = RenderingMode.RefractionBlur; + if(material.shader.name.Contains("Fur")) renderingMode = RenderingMode.Fur; + if(material.shader.name.Contains("FurCutout")) renderingMode = RenderingMode.FurCutout; + if(material.shader.name.Contains("FurTwoPass")) renderingMode = RenderingMode.FurTwoPass; + if(material.shader.name.Contains("Gem")) renderingMode = RenderingMode.Gem; + } + else + { + isOutl = false; + isTess = false; + renderingMode = RenderingMode.Opaque; + } + + // Name + EditorGUILayout.LabelField(GetLoc("sPresetName")); + for(int i = 0; i < langName.Length; i++) + { + presetName[i] = EditorGUILayout.TextField(langName[i], presetName[i]); + } + + preset.category = (lilPresetCategory)EditorGUILayout.Popup(GetLoc("sPresetCategory"), (int)preset.category, sCategorys); + + // Features + EditorGUILayout.Space(); + isShowFeatures = lilEditorGUI.DrawSimpleFoldout(GetLoc("sPresetSaveTarget"), isShowFeatures); + if(isShowFeatures) + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + shouldSaveRenderingMode = EditorGUILayout.ToggleLeft(GetLoc("sRenderingMode"), shouldSaveRenderingMode); + shouldSaveQueue = EditorGUILayout.ToggleLeft("Render Queue", shouldSaveQueue); + shouldSaveMainTex2Outline = EditorGUILayout.ToggleLeft(GetLoc("sPresetMainTex2Outline"), shouldSaveMainTex2Outline); + + EditorGUILayout.Space(); + EditorGUILayout.BeginHorizontal(); + if(GUILayout.Button("Select All")) ToggleAllFeatures(true); + if(GUILayout.Button("Deselect All")) ToggleAllFeatures(false); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.LabelField(GetLoc("sBaseSetting"), EditorStyles.boldLabel); + EditorGUI.indentLevel++; + shouldSaveBase = EditorGUILayout.ToggleLeft(GetLoc("sBaseSetting"), shouldSaveBase); + shouldSaveLighting = EditorGUILayout.ToggleLeft(GetLoc("sLightingSettings"), shouldSaveLighting); + shouldSaveUV = EditorGUILayout.ToggleLeft(GetLoc("sMainUV"), shouldSaveUV); + EditorGUI.indentLevel--; + + EditorGUILayout.LabelField(GetLoc("sColors"), EditorStyles.boldLabel); + EditorGUI.indentLevel++; + shouldSaveMain = EditorGUILayout.ToggleLeft(GetLoc("sMainColor"), shouldSaveMain); + shouldSaveMain2nd = EditorGUILayout.ToggleLeft(GetLoc("sMainColor2nd"), shouldSaveMain2nd); + shouldSaveMain3rd = EditorGUILayout.ToggleLeft(GetLoc("sMainColor3rd"), shouldSaveMain3rd); + shouldSaveAlphaMask = EditorGUILayout.ToggleLeft(GetLoc("sAlphaMask"), shouldSaveAlphaMask); + shouldSaveShadow = EditorGUILayout.ToggleLeft(GetLoc("sShadow"), shouldSaveShadow); + shouldSaveEmission = EditorGUILayout.ToggleLeft(GetLoc("sEmission"), shouldSaveEmission); + shouldSaveEmission2nd = EditorGUILayout.ToggleLeft(GetLoc("sEmission2nd"), shouldSaveEmission2nd); + EditorGUI.indentLevel--; + + EditorGUILayout.LabelField(GetLoc("sNormalMapReflection"), EditorStyles.boldLabel); + EditorGUI.indentLevel++; + shouldSaveNormalMap = EditorGUILayout.ToggleLeft(GetLoc("sNormalMap"), shouldSaveNormalMap); + shouldSaveNormalMap2nd = EditorGUILayout.ToggleLeft(GetLoc("sNormalMap2nd"), shouldSaveNormalMap2nd); + shouldSaveAnisotropy = EditorGUILayout.ToggleLeft(GetLoc("sAnisotropy"), shouldSaveAnisotropy); + shouldSaveRimShade = EditorGUILayout.ToggleLeft(GetLoc("sRimShade"), shouldSaveRimShade); + shouldSaveBacklight = EditorGUILayout.ToggleLeft(GetLoc("sBacklight"), shouldSaveBacklight); + shouldSaveReflection = EditorGUILayout.ToggleLeft(GetLoc("sReflection"), shouldSaveReflection); + shouldSaveMatCap = EditorGUILayout.ToggleLeft(GetLoc("sMatCap"), shouldSaveMatCap); + shouldSaveMatCap2nd = EditorGUILayout.ToggleLeft(GetLoc("sMatCap2nd"), shouldSaveMatCap2nd); + shouldSaveRim = EditorGUILayout.ToggleLeft(GetLoc("sRimLight"), shouldSaveRim); + shouldSaveGlitter = EditorGUILayout.ToggleLeft(GetLoc("sGlitter"), shouldSaveGlitter); + shouldSaveGem = EditorGUILayout.ToggleLeft(GetLoc("sGem"), shouldSaveGem); + EditorGUI.indentLevel--; + + EditorGUILayout.LabelField(GetLoc("sAdvanced"), EditorStyles.boldLabel); + EditorGUI.indentLevel++; + shouldSaveParallax = EditorGUILayout.ToggleLeft(GetLoc("sParallax"), shouldSaveParallax); + shouldSaveDistanceFade = EditorGUILayout.ToggleLeft(GetLoc("sDistanceFade"), shouldSaveDistanceFade); + shouldSaveAudioLink = EditorGUILayout.ToggleLeft(GetLoc("sAudioLink"), shouldSaveAudioLink); + shouldSaveDissolve = EditorGUILayout.ToggleLeft(GetLoc("sDissolve"), shouldSaveDissolve); + shouldSaveRefraction = EditorGUILayout.ToggleLeft(GetLoc("sRefraction"), shouldSaveRefraction); + shouldSaveTessellation = EditorGUILayout.ToggleLeft(GetLoc("sTessellation"), shouldSaveTessellation); + shouldSaveOutline = EditorGUILayout.ToggleLeft(GetLoc("sOutline"), shouldSaveOutline); + if( + renderingMode == RenderingMode.Fur || + renderingMode == RenderingMode.FurCutout || + renderingMode == RenderingMode.FurTwoPass + ) + { + shouldSaveFur = EditorGUILayout.ToggleLeft(GetLoc("sFur"), shouldSaveFur); + shouldSaveFurRendering = EditorGUILayout.ToggleLeft(GetLoc("sRenderingSetting") + " - " + GetLoc("sFur"), shouldSaveFurRendering); + } + else + { + shouldSaveFur = false; + shouldSaveFurRendering = false; + } + shouldSaveStencil = EditorGUILayout.ToggleLeft(GetLoc("sStencilSetting"), shouldSaveStencil); + shouldSaveRendering = EditorGUILayout.ToggleLeft(GetLoc("sRenderingSetting"), shouldSaveRendering); + shouldSaveOutlineRendering = EditorGUILayout.ToggleLeft(GetLoc("sOutline") + " - " + GetLoc("sRenderingSetting"), shouldSaveOutlineRendering); + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + + // Textures + EditorGUILayout.Space(); + isShowTextures = lilEditorGUI.DrawSimpleFoldout(GetLoc("sPresetTexture"), isShowTextures); + if(isShowTextures) + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.BeginHorizontal(); + if(GUILayout.Button("Select All")) ToggleAllTextures(material, true); + if(GUILayout.Button("Deselect All")) ToggleAllTextures(material, false); + EditorGUILayout.EndHorizontal(); + + int propCount = ShaderUtil.GetPropertyCount(material.shader); + for(int i = 0; i < propCount; i++) + { + var propType = ShaderUtil.GetPropertyType(material.shader, i); + if(propType != ShaderUtil.ShaderPropertyType.TexEnv) continue; + + string propName = ShaderUtil.GetPropertyName(material.shader, i); + bool shouldSave = shouldSaveTexs.Contains(propName); + EditorGUI.BeginChangeCheck(); + shouldSave = EditorGUILayout.ToggleLeft(propName, shouldSave); + if(EditorGUI.EndChangeCheck()) + { + if(shouldSave) shouldSaveTexs.Add(propName); + else shouldSaveTexs.Remove(propName); + } + } + EditorGUILayout.EndVertical(); + } + + EditorGUILayout.Space(); + if(GUILayout.Button("Save")) + { + // Preset Name + for(int i = 0; i < langName.Length; i++) + { + if(!string.IsNullOrEmpty(presetName[i])) + { + Array.Resize(ref preset.bases, preset.bases.Length+1); + preset.bases[preset.bases.Length-1].language = langName[i]; + preset.bases[preset.bases.Length-1].name = presetName[i]; + if(string.IsNullOrEmpty(filename) || langName[i] == "English") filename = preset.category.ToString() + "-" + presetName[i]; + } + } + + // Copy properties + CopyPropertiesToPreset(material); + CopyTexturesToPreset(material); + preset.renderingMode = shouldSaveRenderingMode ? renderingMode.ToString() : ""; + preset.shader = null; + preset.renderQueue = shouldSaveQueue ? material.renderQueue : -2; + preset.outline = shouldSaveOutline ? (isOutl?1:0) : -1; + preset.tessellation = shouldSaveTessellation ? (isTess?1:0) : -1; + preset.outlineMainTex = shouldSaveMainTex2Outline; + + EditorUtility.SetDirty(preset); + string presetFolderPath = lilDirectoryManager.GetPresetsFolderPath(); + if(presetFolderPath.Contains("Packages")) presetFolderPath = "Assets/"; + string savePath = EditorUtility.SaveFilePanel("Save Preset", presetFolderPath, filename, "asset"); + if(!string.IsNullOrEmpty(savePath)) + { + AssetDatabase.CreateAsset(preset, FileUtil.GetProjectRelativePath(savePath)); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + AssetDatabase.ImportAsset(FileUtil.GetProjectRelativePath(savePath), ImportAssetOptions.ForceUpdate); + lilToonInspector.presets = LoadPresets(); + Close(); + } + } + + EditorGUILayout.EndScrollView(); + } + #pragma warning restore CS0612 + + private void CopyPropertiesToPreset(Material material) + { + int propCount = ShaderUtil.GetPropertyCount(material.shader); + for(int i = 0; i < propCount; i++) + { + string propName = ShaderUtil.GetPropertyName(material.shader, i); + + if(!( + shouldSaveBase && lilPropertyNameChecker.IsBaseProperty(propName) || + shouldSaveLighting && lilPropertyNameChecker.IsLightingProperty(propName) || + shouldSaveUV && lilPropertyNameChecker.IsUVProperty(propName) || + shouldSaveMain && lilPropertyNameChecker.IsMainProperty(propName) || + shouldSaveMain2nd && lilPropertyNameChecker.IsMain2ndProperty(propName) || + shouldSaveMain3rd && lilPropertyNameChecker.IsMain3rdProperty(propName) || + shouldSaveAlphaMask && lilPropertyNameChecker.IsAlphaMaskProperty(propName) || + shouldSaveShadow && lilPropertyNameChecker.IsShadowProperty(propName) || + shouldSaveEmission && lilPropertyNameChecker.IsEmissionProperty(propName) || + shouldSaveEmission2nd && lilPropertyNameChecker.IsEmission2ndProperty(propName) || + shouldSaveNormalMap && lilPropertyNameChecker.IsNormalMapProperty(propName) || + shouldSaveNormalMap2nd && lilPropertyNameChecker.IsNormalMap2ndProperty(propName) || + shouldSaveAnisotropy && lilPropertyNameChecker.IsAnisotropyProperty(propName) || + shouldSaveRimShade && lilPropertyNameChecker.IsRimShadeProperty(propName) || + shouldSaveBacklight && lilPropertyNameChecker.IsBacklightProperty(propName) || + shouldSaveReflection && lilPropertyNameChecker.IsReflectionProperty(propName) || + shouldSaveMatCap && lilPropertyNameChecker.IsMatCapProperty(propName) || + shouldSaveMatCap2nd && lilPropertyNameChecker.IsMatCap2ndProperty(propName) || + shouldSaveRim && lilPropertyNameChecker.IsRimProperty(propName) || + shouldSaveGlitter && lilPropertyNameChecker.IsGlitterProperty(propName) || + shouldSaveParallax && lilPropertyNameChecker.IsParallaxProperty(propName) || + shouldSaveDistanceFade && lilPropertyNameChecker.IsDistanceFadeProperty(propName) || + shouldSaveAudioLink && lilPropertyNameChecker.IsAudioLinkProperty(propName) || + shouldSaveDissolve && lilPropertyNameChecker.IsDissolveProperty(propName) || + shouldSaveRefraction && lilPropertyNameChecker.IsRefractionProperty(propName) || + shouldSaveGem && lilPropertyNameChecker.IsGemProperty(propName) || + shouldSaveTessellation && lilPropertyNameChecker.IsTessellationProperty(propName) || + shouldSaveOutline && lilPropertyNameChecker.IsOutlineProperty(propName) || + shouldSaveFur && lilPropertyNameChecker.IsFurProperty(propName) || + shouldSaveStencil && lilPropertyNameChecker.IsStencilProperty(propName) || + shouldSaveRendering && lilPropertyNameChecker.IsRenderingProperty(propName) || + shouldSaveOutlineRendering && lilPropertyNameChecker.IsOutlineRenderingProperty(propName) || + shouldSaveFurRendering && lilPropertyNameChecker.IsFurRenderingProperty(propName) + )) continue; + + var propType = ShaderUtil.GetPropertyType(material.shader, i); + if(propType == ShaderUtil.ShaderPropertyType.Color) + { + Array.Resize(ref preset.colors, preset.colors.Length + 1); + preset.colors[preset.colors.Length-1].name = propName; + preset.colors[preset.colors.Length-1].value = material.GetColor(propName); + } + if(propType == ShaderUtil.ShaderPropertyType.Vector) + { + Array.Resize(ref preset.vectors, preset.vectors.Length + 1); + preset.vectors[preset.vectors.Length-1].name = propName; + preset.vectors[preset.vectors.Length-1].value = material.GetVector(propName); + } + if(propType == ShaderUtil.ShaderPropertyType.Float || propType == ShaderUtil.ShaderPropertyType.Range) + { + if(!(!shouldSaveStencil && propName == "_StencilRef" && propName == "_StencilComp" && propName == "_StencilPass" && propName == "_StencilFail" && propName == "_StencilZFail")) + { + Array.Resize(ref preset.floats, preset.floats.Length + 1); + preset.floats[preset.floats.Length-1].name = propName; + preset.floats[preset.floats.Length-1].value = material.GetFloat(propName); + } + } + } + } + + private void CopyTexturesToPreset(Material material) + { + foreach(var name in shouldSaveTexs) + { + CopyTextureToPreset(material, name); + } + } + + private void CopyTextureToPreset(Material material, string propName) + { + if(!material.HasProperty(propName)) return; + Array.Resize(ref preset.textures, preset.textures.Length + 1); + preset.textures[preset.textures.Length-1].name = propName; + preset.textures[preset.textures.Length-1].value = material.GetTexture(propName); + preset.textures[preset.textures.Length-1].offset = material.GetTextureOffset(propName); + preset.textures[preset.textures.Length-1].scale = material.GetTextureScale(propName); + } + + private void ToggleAllFeatures(bool val) + { + shouldSaveBase = val; + shouldSaveLighting = val; + shouldSaveUV = val; + shouldSaveMain = val; + shouldSaveMain2nd = val; + shouldSaveMain3rd = val; + shouldSaveAlphaMask = val; + shouldSaveShadow = val; + shouldSaveEmission = val; + shouldSaveEmission2nd = val; + shouldSaveNormalMap = val; + shouldSaveNormalMap2nd = val; + shouldSaveAnisotropy = val; + shouldSaveRimShade = val; + shouldSaveBacklight = val; + shouldSaveReflection = val; + shouldSaveMatCap = val; + shouldSaveMatCap2nd = val; + shouldSaveRim = val; + shouldSaveGlitter = val; + shouldSaveParallax = val; + shouldSaveDistanceFade = val; + shouldSaveAudioLink = val; + shouldSaveDissolve = val; + shouldSaveRefraction = val; + shouldSaveGem = val; + shouldSaveTessellation = val; + shouldSaveOutline = val; + shouldSaveFur = val; + shouldSaveStencil = val; + shouldSaveRendering = val; + shouldSaveOutlineRendering = val; + shouldSaveFurRendering = val; + } + + private void ToggleAllTextures(Material material, bool val) + { + int propCount = ShaderUtil.GetPropertyCount(material.shader); + for(int i = 0; i < propCount; i++) + { + var propType = ShaderUtil.GetPropertyType(material.shader, i); + if(propType != ShaderUtil.ShaderPropertyType.TexEnv) continue; + + string propName = ShaderUtil.GetPropertyName(material.shader, i); + if(val && !shouldSaveTexs.Contains(propName)) shouldSaveTexs.Add(propName); + if(!val && shouldSaveTexs.Contains(propName)) shouldSaveTexs.Remove(propName); + } + } + + [Obsolete] public static string GetLoc(string value) { return lilLanguageManager.GetLoc(value); } + } + #endregion +} + +namespace lilToon +{ + public enum lilPresetCategory + { + Skin, + Hair, + Cloth, + Nature, + Inorganic, + Effect, + Other + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilToonPreset.cs.meta b/Assets/External/lilToon/Editor/lilToonPreset.cs.meta new file mode 100644 index 00000000..fa5105ce --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonPreset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 330d117753a947947bf5a4f237b9a9f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs b/Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs new file mode 100644 index 00000000..9ffd47bb --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs @@ -0,0 +1,1111 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using System; + +namespace lilToon +{ + //------------------------------------------------------------------------------------------------------------------------------ + // PropertyDrawer + public class lilHDRDrawer : MaterialPropertyDrawer + { + // Gamma HDR + // [lilHDR] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + #if UNITY_2019_1_OR_NEWER + float xMax = position.xMax; + position.width = string.IsNullOrEmpty(label) ? Mathf.Min(50.0f, position.width) : EditorGUIUtility.labelWidth + 50.0f; + var value = prop.colorValue; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + value = EditorGUI.ColorField(position, new GUIContent(label), value, true, true, true); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.colorValue = value; + } + + // Hex + EditorGUI.BeginChangeCheck(); + float intensity = value.maxColorComponent > 1.0f ? value.maxColorComponent : 1.0f; + var value2 = new Color(value.r / intensity, value.g / intensity, value.b / intensity, 1.0f); + string hex = ColorUtility.ToHtmlStringRGB(value2); + int indentLevel = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + position.x += position.width + 4.0f; + #if UNITY_2021_2_OR_NEWER + position.width = Mathf.Min(50.0f, xMax - position.x); + if(position.width > 10.0f) + { + EditorGUI.showMixedValue = prop.hasMixedValue; + hex = "#" + EditorGUI.TextField(position, GUIContent.none, hex); + EditorGUI.showMixedValue = false; + } + #else + position.width = 50.0f; + EditorGUI.showMixedValue = prop.hasMixedValue; + hex = "#" + EditorGUI.TextField(position, GUIContent.none, hex); + EditorGUI.showMixedValue = false; + #endif + EditorGUI.indentLevel = indentLevel; + if(EditorGUI.EndChangeCheck()) + { + if(!ColorUtility.TryParseHtmlString(hex, out value2)) return; + value.r = value2.r * intensity; + value.g = value2.g * intensity; + value.b = value2.b * intensity; + prop.colorValue = value; + } + #else + var value = prop.colorValue; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + value = EditorGUI.ColorField(position, new GUIContent(label), value, true, true, true); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.colorValue = value; + } + #endif + } + } + + public class lilToggleDrawer : MaterialPropertyDrawer + { + // Toggle without setting shader keyword + // [lilToggle] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + bool value = prop.floatValue != 0.0f; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + value = EditorGUI.Toggle(position, label, value); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = value ? 1.0f : 0.0f; + } + } + } + + public class lilToggleLeftDrawer : MaterialPropertyDrawer + { + // Toggle without setting shader keyword + // [lilToggleLeft] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + position.width -= 24; + bool value = prop.floatValue != 0.0f; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + if(EditorGUIUtility.isProSkin) + { + value = EditorGUI.ToggleLeft(position, label, value); + } + else + { + var customToggleFont = new GUIStyle(); + customToggleFont.normal.textColor = Color.white; + customToggleFont.contentOffset = new Vector2(2f,0f); + value = EditorGUI.ToggleLeft(position, label, value, customToggleFont); + } + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = value ? 1.0f : 0.0f; + } + } + } + + public class lilAngleDrawer : MaterialPropertyDrawer + { + // [lilAngle] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + // Radian -> Degree + float angle180 = lilEditorGUI.Radian2Degree(prop.floatValue); + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + angle180 = EditorGUI.Slider(position, label, angle180, -180.0f, 180.0f); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + // Degree -> Radian + prop.floatValue = lilEditorGUI.Degree2Radian(angle180); + } + } + } + + public class lilLODDrawer : MaterialPropertyDrawer + { + // [lilLOD] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + float val = lilEditorGUI.RoundFloat1000000(Mathf.Pow(prop.floatValue, 0.25f)); + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + val = EditorGUI.Slider(position, label, val, 0.0f, 1.0f); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = Mathf.Pow(val, 4.0f); + } + } + } + + public class lilBlinkDrawer : MaterialPropertyDrawer + { + // [lilBlink] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float strength = prop.vectorValue.x; + float type = prop.vectorValue.y; + float speed = prop.vectorValue.z / Mathf.PI; + float offset = prop.vectorValue.w / Mathf.PI; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + labels[3] = prop.name + ".w"; + } + + EditorGUI.BeginChangeCheck(); + strength = EditorGUI.Slider(position, labels[0], strength, 0.0f, 1.0f); + if(strength != 0.0f) + { + type = EditorGUI.Toggle(EditorGUILayout.GetControlRect(), labels[1], type > 0.5f) ? 1.0f : 0.0f; + speed = EditorGUI.FloatField(EditorGUILayout.GetControlRect(), labels[2], speed); + offset = EditorGUI.FloatField(EditorGUILayout.GetControlRect(), labels[3], offset); + } + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(strength, type, speed * Mathf.PI, offset * Mathf.PI); + } + } + } + + public class lilVec2RDrawer : MaterialPropertyDrawer + { + // Draw vector4 as vector3 + // [lilVec2R] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var position1 = EditorGUILayout.GetControlRect(); + float x = prop.vectorValue.x; + float y = prop.vectorValue.y; + + EditorGUIUtility.wideMode = true; + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + x = EditorGUI.Slider(position, label + ": x", x, 0.0f, 1.0f); + y = EditorGUI.Slider(position1, label + ": y", y, 0.0f, 1.0f); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(x, y, prop.vectorValue.z, prop.vectorValue.w); + } + } + } + + public class lilVec2Drawer : MaterialPropertyDrawer + { + // Draw vector4 as vector2 + // [lilVec2] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var vec = new Vector2(prop.vectorValue.x, prop.vectorValue.y); + float unused0 = prop.vectorValue.z; + float unused1 = prop.vectorValue.w; + + EditorGUIUtility.wideMode = true; + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + vec = EditorGUI.Vector2Field(position, label, vec); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(vec.x, vec.y, unused0, unused1); + } + } + } + + public class lilVec3Drawer : MaterialPropertyDrawer + { + // Draw vector4 as vector3 + // [lilVec3] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var vec = new Vector3(prop.vectorValue.x, prop.vectorValue.y, prop.vectorValue.z); + float unused = prop.vectorValue.w; + + EditorGUIUtility.wideMode = true; + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + vec = EditorGUI.Vector3Field(position, label, vec); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(vec.x, vec.y, vec.z, unused); + } + } + } + + public class lilVec3FloatDrawer : MaterialPropertyDrawer + { + // Draw vector4 as vector3 and float + // [lilVec3Float] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + var vec = new Vector3(prop.vectorValue.x, prop.vectorValue.y, prop.vectorValue.z); + float length = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".xyz"; + labels[1] = prop.name + ".w"; + } + + EditorGUIUtility.wideMode = true; + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + vec = EditorGUI.Vector3Field(position, labels[0], vec); + length = EditorGUI.FloatField(EditorGUILayout.GetControlRect(), labels[1], length); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(vec.x, vec.y, vec.z, length); + } + } + } + + public class lilHSVGDrawer : MaterialPropertyDrawer + { + // Hue Saturation Value Gamma + // [lilHSVG] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float hue = prop.vectorValue.x; + float sat = prop.vectorValue.y; + float val = prop.vectorValue.z; + float gamma = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + labels[3] = prop.name + ".w"; + } + + EditorGUI.BeginChangeCheck(); + hue = EditorGUI.Slider(position, labels[0], hue, -0.5f, 0.5f); + sat = EditorGUI.Slider(EditorGUILayout.GetControlRect(), labels[1], sat, 0.0f, 2.0f); + val = EditorGUI.Slider(EditorGUILayout.GetControlRect(), labels[2], val, 0.0f, 2.0f); + gamma = EditorGUI.Slider(EditorGUILayout.GetControlRect(), labels[3], gamma, 0.01f, 2.0f); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(hue, sat, val, gamma); + } + } + } + + public class lilUVAnim : MaterialPropertyDrawer + { + // Angle Scroll Rotate + // [lilUVAnim] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + var scroll = new Vector2(prop.vectorValue.x, prop.vectorValue.y); + float angle = lilEditorGUI.Radian2Degree(prop.vectorValue.z); + float rotate = lilEditorGUI.RoundFloat1000000(prop.vectorValue.w / Mathf.PI * 0.5f); + + EditorGUI.BeginChangeCheck(); + + if(labels.Length == 1) + { + float labelWidth = EditorGUIUtility.labelWidth; + var labelRect = new Rect(position.x, position.y, labelWidth, position.height); + EditorGUI.PrefixLabel(labelRect, new GUIContent(labels[0])); + int indentBuf = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + var vecRect = new Rect(position.x + labelWidth, position.y, position.width - labelWidth, position.height); + scroll = EditorGUI.Vector2Field(vecRect, GUIContent.none, scroll); + EditorGUI.indentLevel = indentBuf; + } + else + { + if(Event.current.alt) + { + labels[0] = prop.name + ".z"; + labels[2] = prop.name + ".xy"; + labels[3] = prop.name + ".w"; + } + // Angle + angle = EditorGUI.Slider(position, labels[0], angle, -180.0f, 180.0f); + + lilEditorGUI.DrawLine(); + + // Heading (UV Animation) + EditorGUILayout.LabelField(labels[1], EditorStyles.boldLabel); + + var positionVec2 = EditorGUILayout.GetControlRect(); + + // Scroll label + float labelWidth = EditorGUIUtility.labelWidth; + var labelRect = new Rect(positionVec2.x, positionVec2.y, labelWidth, positionVec2.height); + EditorGUI.PrefixLabel(labelRect, new GUIContent(labels[2])); + + // Copy & Reset indent + int indentBuf = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + + // Scroll + var vecRect = new Rect(positionVec2.x + labelWidth, positionVec2.y, positionVec2.width - labelWidth, positionVec2.height); + scroll = EditorGUI.Vector2Field(vecRect, GUIContent.none, scroll); + + // Revert indent + EditorGUI.indentLevel = indentBuf; + + // Rotate + rotate = EditorGUI.FloatField(EditorGUILayout.GetControlRect(), labels[3], rotate); + } + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(scroll.x, scroll.y, lilEditorGUI.Degree2Radian(angle), rotate * Mathf.PI * 2.0f); + } + } + } + + public class lilDecalAnim : MaterialPropertyDrawer + { + // [lilDecalAnim] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + int loopX = (int)prop.vectorValue.x; + int loopY = (int)prop.vectorValue.y; + int frames = (int)prop.vectorValue.z; + float speed = prop.vectorValue.w; + if(Event.current.alt) + { + labels[1] = prop.name + ".x"; + labels[2] = prop.name + ".y"; + labels[3] = prop.name + ".z"; + labels[4] = prop.name + ".w"; + } + + // Heading (UV Animation) + EditorGUI.LabelField(position, labels[0], EditorStyles.boldLabel); + + EditorGUI.indentLevel++; + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + var position4 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + loopX = EditorGUI.IntField(position1, labels[1], loopX); + loopY = EditorGUI.IntField(position2, labels[2], loopY); + frames = EditorGUI.IntField(position3, labels[3], frames); + speed = EditorGUI.FloatField(position4, labels[4], speed); + EditorGUI.indentLevel--; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(loopX, loopY, frames, speed); + } + } + } + + public class lilDecalSub : MaterialPropertyDrawer + { + // [lilDecalSub] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float scaleX = prop.vectorValue.x; + float scaleY = prop.vectorValue.y; + float border = prop.vectorValue.z; + float unused = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + } + + EditorGUI.indentLevel++; + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + scaleX = EditorGUI.Slider(position, labels[0], scaleX, 0.0f, 1.0f); + scaleY = EditorGUI.Slider(position1, labels[1], scaleY, 0.0f, 1.0f); + border = EditorGUI.Slider(position2, labels[2], border, 0.0f, 1.0f); + EditorGUI.indentLevel--; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(scaleX, scaleY, border, unused); + } + } + } + + public class lilEnum : MaterialPropertyDrawer + { + // [lilEnum] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + var enums = new string[labels.Length-1]; + Array.Copy(labels, 1, enums, 0, labels.Length-1); + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + float value = EditorGUI.Popup(position, labels[0], (int)prop.floatValue, enums); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = value; + } + } + } + + public class lilEnumLabel : MaterialPropertyDrawer + { + // [lilEnum] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + var enums = new string[labels.Length-1]; + Array.Copy(labels, 1, enums, 0, labels.Length-1); + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + float value = prop.floatValue; + if(EditorGUIUtility.isProSkin) + { + value = EditorGUI.Popup(position, labels[0], (int)value, enums); + } + else + { + var customToggleFont = new GUIStyle(); + customToggleFont.normal.textColor = Color.white; + customToggleFont.contentOffset = new Vector2(2f,0f); + float labelWidth = EditorGUIUtility.labelWidth; + var labelRect = new Rect(position.x, position.y, labelWidth, position.height); + EditorGUI.PrefixLabel(labelRect, new GUIContent(labels[0]), customToggleFont); + value = EditorGUI.Popup(position, " ", (int)value, enums); + } + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = value; + } + } + } + + public class lilColorMask : MaterialPropertyDrawer + { + // ColorMask + // [lilColorMask] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var masks = new string[]{"None","A","B","BA","G","GA","GB","GBA","R","RA","RB","RBA","RG","RGA","RGB","RGBA"}; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + float cullFloat = EditorGUI.Popup(position, label, (int)prop.floatValue, masks); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = cullFloat; + } + } + } + + public class lil3Param : MaterialPropertyDrawer + { + // [lil3Param] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float unused = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + } + + EditorGUI.indentLevel++; + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + param1 = EditorGUI.FloatField(position, labels[0], param1); + param2 = EditorGUI.FloatField(position1, labels[1], param2); + param3 = EditorGUI.FloatField(position2, labels[2], param3); + EditorGUI.indentLevel--; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, unused); + } + } + } + + public class lilFF : MaterialPropertyDrawer + { + // [lilFF] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float param4 = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + } + + var position1 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + param1 = EditorGUI.FloatField(position, labels[0], param1); + param2 = EditorGUI.FloatField(position1, labels[1], param2); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, param4); + } + } + } + + public class lilFFFF : MaterialPropertyDrawer + { + // [lilFFFF] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float param4 = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + labels[3] = prop.name + ".w"; + } + + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + param1 = EditorGUI.FloatField(position, labels[0], param1); + param2 = EditorGUI.FloatField(position1, labels[1], param2); + param3 = EditorGUI.FloatField(position2, labels[2], param3); + param4 = EditorGUI.FloatField(position3, labels[3], param4); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, param4); + } + } + } + + public class lilFFFB : MaterialPropertyDrawer + { + // [lilFFFB] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + bool param4 = prop.vectorValue.w != 0.0f; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + labels[3] = prop.name + ".w"; + } + + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + param1 = EditorGUI.FloatField(position, labels[0], param1); + param2 = EditorGUI.FloatField(position1, labels[1], param2); + param3 = EditorGUI.FloatField(position2, labels[2], param3); + param4 = EditorGUI.Toggle(position3, labels[3], param4); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, param4 ? 1.0f : 0.0f); + } + } + } + + public class lilFRFR : MaterialPropertyDrawer + { + // [lilFRFR] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float param4 = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + labels[3] = prop.name + ".w"; + } + + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + param1 = EditorGUI.FloatField(position, labels[0], param1); + param2 = EditorGUI.Slider(position1, labels[1], param2, 0.0f, 1.0f); + param3 = EditorGUI.FloatField(position2, labels[2], param3); + param4 = EditorGUI.Slider(position3, labels[3], param4, 0.0f, 1.0f); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, param4); + } + } + } + + public class lilVec3BDrawer : MaterialPropertyDrawer + { + // Draw vector4 as vector3 and float + // [lilVec3B] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + var vec = new Vector3(prop.vectorValue.x, prop.vectorValue.y, prop.vectorValue.z); + bool value = prop.vectorValue.w != 0.0f; + if(Event.current.alt) + { + labels[0] = prop.name + ".xyz"; + labels[1] = prop.name + ".w"; + } + + var position1 = EditorGUILayout.GetControlRect(); + + EditorGUIUtility.wideMode = true; + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + vec = EditorGUI.Vector3Field(position, labels[0], vec); + EditorGUI.indentLevel++; + value = EditorGUI.Toggle(position1, labels[1], value); + EditorGUI.indentLevel--; + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(vec.x, vec.y, vec.z, value ? 1.0f : 0.0f); + } + } + } + + public class lilALUVParams : MaterialPropertyDrawer + { + // [lilALUVParams] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float scale = prop.vectorValue.x; + float offset = prop.vectorValue.y; + float angle180 = lilEditorGUI.Radian2Degree(prop.vectorValue.z); + float band = (prop.vectorValue.w - 0.125f) * 4.0f; + + EditorGUI.BeginChangeCheck(); + if(labels.Length == 6) + { + if(Event.current.alt) + { + labels[0] = prop.name + ".y"; + labels[1] = prop.name + ".w"; + } + var position1 = EditorGUILayout.GetControlRect(); + offset = EditorGUI.FloatField(position, labels[0], offset); + band = EditorGUI.Popup(position1, labels[1], (int)band, new string[]{labels[2],labels[3],labels[4],labels[5]}); + } + if(labels.Length == 7) + { + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".w"; + } + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + scale = EditorGUI.FloatField(position, labels[0], scale); + offset = EditorGUI.FloatField(position1, labels[1], offset); + band = EditorGUI.Popup(position2, labels[2], (int)band, new string[]{labels[3],labels[4],labels[5],labels[6]}); + } + if(labels.Length == 8) + { + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + labels[3] = prop.name + ".w"; + } + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + scale = EditorGUI.FloatField(position, labels[0], scale); + offset = EditorGUI.FloatField(position1, labels[1], offset); + angle180 = EditorGUI.Slider(position2, labels[2], angle180, -180.0f, 180.0f); + band = EditorGUI.Popup(position3, labels[3], (int)band, new string[]{labels[4],labels[5],labels[6],labels[7]}); + } + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(scale, offset, lilEditorGUI.Degree2Radian(angle180), (band / 4.0f) + 0.125f); + } + } + } + + public class lilALLocal : MaterialPropertyDrawer + { + // [lilALLocal] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float BPM = prop.vectorValue.x; + float Notes = prop.vectorValue.y; + float Offset = prop.vectorValue.z; + float unused = prop.vectorValue.w; + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + } + + EditorGUI.indentLevel++; + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + BPM = EditorGUI.FloatField(position, labels[0], BPM); + Notes = EditorGUI.FloatField(position1, labels[1], Notes); + Offset = EditorGUI.FloatField(position2, labels[2], Offset); + EditorGUI.indentLevel--; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(BPM, Notes, Offset, unused); + } + } + } + + public class lilDissolve : MaterialPropertyDrawer + { + // [lilDissolve] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float type = prop.vectorValue.x; + float shape = prop.vectorValue.y; + float border = prop.vectorValue.z; + float blur = prop.vectorValue.w; + + EditorGUI.BeginChangeCheck(); + if(labels.Length == 5) + { + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + } + if(EditorGUIUtility.isProSkin) + { + type = EditorGUI.Popup(position, labels[0], (int)type, new string[]{labels[1],labels[2],labels[3],labels[4]}); + } + else + { + var customToggleFont = new GUIStyle(); + customToggleFont.normal.textColor = Color.white; + customToggleFont.contentOffset = new Vector2(2f,0f); + float labelWidth = EditorGUIUtility.labelWidth; + var labelRect = new Rect(position.x, position.y, labelWidth, position.height); + EditorGUI.PrefixLabel(labelRect, new GUIContent(labels[0]), customToggleFont); + type = EditorGUI.Popup(position, " ", (int)type, new string[]{labels[1],labels[2],labels[3],labels[4]}); + } + } + if(labels.Length == 6) + { + if(Event.current.alt) + { + labels[0] = prop.name + ".y"; + labels[3] = prop.name + ".z"; + labels[4] = prop.name + ".w"; + } + if(type == 1.0f) + { + var position1 = EditorGUILayout.GetControlRect(); + border = EditorGUI.Slider(position, labels[3], border, -1.0f, 2.0f); + blur = EditorGUI.Slider(position1, labels[4], blur, 0.0f, 1.0f); + } + if(type == 2.0f) + { + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + shape = EditorGUI.Popup(position, labels[0], (int)shape, new string[]{labels[1],labels[2]}); + border = EditorGUI.FloatField(position1, labels[3], border); + blur = EditorGUI.FloatField(position2, labels[4], blur); + } + if(type == 3.0f) + { + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + shape = EditorGUI.Popup(position, labels[0], (int)shape, new string[]{labels[1],labels[2]}); + border = EditorGUI.FloatField(position1, labels[3], border); + blur = EditorGUI.FloatField(position2, labels[4], blur); + } + } + if(labels.Length == 10) + { + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[5] = prop.name + ".y"; + labels[8] = prop.name + ".z"; + labels[9] = prop.name + ".w"; + } + type = EditorGUI.Popup(position, labels[0], (int)type, new string[]{labels[1],labels[2],labels[3],labels[4]}); + if(type == 1.0f) + { + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + border = EditorGUI.Slider(position1, labels[8], border, -1.0f, 2.0f); + blur = EditorGUI.Slider(position2, labels[9], blur, 0.0f, 1.0f); + } + if(type == 2.0f) + { + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + shape = EditorGUI.Popup(position1, labels[5], (int)shape, new string[]{labels[6],labels[7]}); + border = EditorGUI.FloatField(position2, labels[8], border); + blur = EditorGUI.FloatField(position3, labels[9], blur); + } + if(type == 3.0f) + { + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + shape = EditorGUI.Popup(position1, labels[5], (int)shape, new string[]{labels[6],labels[7]}); + border = EditorGUI.FloatField(position2, labels[8], border); + blur = EditorGUI.FloatField(position3, labels[9], blur); + } + } + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(type, shape, border, blur); + } + } + } + + public class lilDissolveP : MaterialPropertyDrawer + { + // [lilDissolveP] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + + if(labels.Length == 2) + { + int type = int.Parse(labels[1]); + if(type == 1) + { + EditorGUI.BeginChangeCheck(); + float value = EditorGUI.FloatField(position, labels[0], prop.vectorValue.x); + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(value, prop.vectorValue.y, prop.vectorValue.z, prop.vectorValue.w); + } + } + if(type == 2) + { + EditorGUI.BeginChangeCheck(); + var vec = EditorGUI.Vector2Field(position, labels[0], new Vector2(prop.vectorValue.x, prop.vectorValue.y)); + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(vec.x, vec.y, prop.vectorValue.z, prop.vectorValue.w); + } + } + if(type == 3) + { + EditorGUI.BeginChangeCheck(); + var vec = EditorGUI.Vector3Field(position, labels[0], new Vector3(prop.vectorValue.x, prop.vectorValue.y, prop.vectorValue.z)); + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(vec.x, vec.y, vec.z, prop.vectorValue.w); + } + } + if(type == 4) + { + EditorGUI.BeginChangeCheck(); + var vec = EditorGUI.Vector4Field(position, labels[0], prop.vectorValue); + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = vec; + } + } + } + else + { + EditorGUI.BeginChangeCheck(); + var vec = EditorGUI.Vector4Field(position, labels[0], prop.vectorValue); + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = vec; + } + } + } + } + + public class lilOLWidth : MaterialPropertyDrawer + { + // [lilOLWidth] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + float value = prop.floatValue; + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + if(value > 0.999f) + { + value = EditorGUI.FloatField(position, label, value); + } + else + { + value = EditorGUI.Slider(position, label, value, 0.0f, 1.0f); + } + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.floatValue = value; + } + } + } + + public class lilGlitParam1 : MaterialPropertyDrawer + { + // [lilGlitParam1] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + var tiling = new Vector2(prop.vectorValue.x, prop.vectorValue.y); + float size = prop.vectorValue.z == 0.0f ? 0.0f : Mathf.Sqrt(prop.vectorValue.z); + float contrast = prop.vectorValue.w; + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + EditorGUIUtility.wideMode = true; + if(Event.current.alt) + { + labels[0] = prop.name + ".xy"; + labels[1] = prop.name + ".z"; + labels[2] = prop.name + ".w"; + } + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + tiling = EditorGUI.Vector2Field(position, labels[0], tiling); + size = EditorGUI.Slider(position1, labels[1], size, 0.0f, 2.0f); + contrast = EditorGUI.FloatField(position2, labels[2], contrast); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(tiling.x, tiling.y, size * size, contrast); + } + } + } + + public class lilGlitParam2 : MaterialPropertyDrawer + { + // [lilGlitParam2] + public override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor) + { + var labels = label.Split('|'); + float speed = prop.vectorValue.x; + float angle = prop.vectorValue.y; + float light = prop.vectorValue.z; + float random = prop.vectorValue.w; + var position1 = EditorGUILayout.GetControlRect(); + var position2 = EditorGUILayout.GetControlRect(); + var position3 = EditorGUILayout.GetControlRect(); + if(Event.current.alt) + { + labels[0] = prop.name + ".x"; + labels[1] = prop.name + ".y"; + labels[2] = prop.name + ".z"; + labels[3] = prop.name + ".w"; + } + + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + speed = EditorGUI.FloatField(position, labels[0], speed); + angle = EditorGUI.FloatField(position1, labels[1], angle); + light = EditorGUI.FloatField(position2, labels[2], light); + random = EditorGUI.Slider(position3, labels[3], random, 0.0f, 1.0f); + EditorGUI.showMixedValue = false; + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(speed, angle, light, random); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs.meta b/Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs.meta new file mode 100644 index 00000000..b765a78c --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e4575f0fa316410499a82e6e3ceb5562 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Editor/lilToonSetting.cs b/Assets/External/lilToon/Editor/lilToonSetting.cs new file mode 100644 index 00000000..daf8496c --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonSetting.cs @@ -0,0 +1,1558 @@ +#if !LILTOON_VRCSDK3_AVATARS && !LILTOON_VRCSDK3_WORLDS && VRC_SDK_VRCSDK3 + #if UDON + #define LILTOON_VRCSDK3_WORLDS + #else + #define LILTOON_VRCSDK3_AVATARS + #endif +#endif +#if UNITY_EDITOR +using lilToon; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; +#if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER) + using System.Text.RegularExpressions; +#endif + +public class lilToonSetting : ScriptableObject +{ + public bool LIL_FEATURE_ANIMATE_MAIN_UV = true; + public bool LIL_FEATURE_MAIN_TONE_CORRECTION = true; + public bool LIL_FEATURE_MAIN_GRADATION_MAP = true; + public bool LIL_FEATURE_MAIN2ND = true; + public bool LIL_FEATURE_MAIN3RD = true; + public bool LIL_FEATURE_DECAL = true; + public bool LIL_FEATURE_ANIMATE_DECAL = true; + public bool LIL_FEATURE_LAYER_DISSOLVE = true; + public bool LIL_FEATURE_ALPHAMASK = true; + public bool LIL_FEATURE_SHADOW = true; + public bool LIL_FEATURE_RECEIVE_SHADOW = true; + public bool LIL_FEATURE_SHADOW_3RD = true; + public bool LIL_FEATURE_SHADOW_LUT = true; + public bool LIL_FEATURE_RIMSHADE = true; + public bool LIL_FEATURE_EMISSION_1ST = true; + public bool LIL_FEATURE_EMISSION_2ND = true; + public bool LIL_FEATURE_ANIMATE_EMISSION_UV = true; + public bool LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = true; + public bool LIL_FEATURE_EMISSION_GRADATION = true; + public bool LIL_FEATURE_NORMAL_1ST = true; + public bool LIL_FEATURE_NORMAL_2ND = true; + public bool LIL_FEATURE_ANISOTROPY = true; + public bool LIL_FEATURE_REFLECTION = true; + public bool LIL_FEATURE_MATCAP = true; + public bool LIL_FEATURE_MATCAP_2ND = true; + public bool LIL_FEATURE_RIMLIGHT = true; + public bool LIL_FEATURE_RIMLIGHT_DIRECTION = true; + public bool LIL_FEATURE_GLITTER = true; + public bool LIL_FEATURE_BACKLIGHT = true; + public bool LIL_FEATURE_PARALLAX = true; + public bool LIL_FEATURE_POM = false; + public bool LIL_FEATURE_CLIPPING_CANCELLER = false; + public bool LIL_FEATURE_DISTANCE_FADE = true; + public bool LIL_FEATURE_AUDIOLINK = true; + public bool LIL_FEATURE_AUDIOLINK_VERTEX = true; + public bool LIL_FEATURE_AUDIOLINK_LOCAL = true; + public bool LIL_FEATURE_DISSOLVE = true; + public bool LIL_FEATURE_IDMASK = true; + public bool LIL_FEATURE_UDIMDISCARD = true; + public bool LIL_FEATURE_DITHER = true; + public bool LIL_FEATURE_ENCRYPTION = false; + public bool LIL_FEATURE_ANIMATE_OUTLINE_UV = true; + public bool LIL_FEATURE_OUTLINE_TONE_CORRECTION = true; + public bool LIL_FEATURE_OUTLINE_RECEIVE_SHADOW = true; + public bool LIL_FEATURE_FUR_COLLISION = true; + + public bool LIL_FEATURE_MainGradationTex = true; + public bool LIL_FEATURE_MainColorAdjustMask = true; + public bool LIL_FEATURE_Main2ndTex = true; + public bool LIL_FEATURE_Main2ndBlendMask = true; + public bool LIL_FEATURE_Main2ndDissolveMask = true; + public bool LIL_FEATURE_Main2ndDissolveNoiseMask = true; + public bool LIL_FEATURE_Main3rdTex = true; + public bool LIL_FEATURE_Main3rdBlendMask = true; + public bool LIL_FEATURE_Main3rdDissolveMask = true; + public bool LIL_FEATURE_Main3rdDissolveNoiseMask = true; + public bool LIL_FEATURE_AlphaMask = true; + public bool LIL_FEATURE_BumpMap = true; + public bool LIL_FEATURE_Bump2ndMap = true; + public bool LIL_FEATURE_Bump2ndScaleMask = true; + public bool LIL_FEATURE_AnisotropyTangentMap = true; + public bool LIL_FEATURE_AnisotropyScaleMask = true; + public bool LIL_FEATURE_AnisotropyShiftNoiseMask = true; + public bool LIL_FEATURE_ShadowBorderMask = true; + public bool LIL_FEATURE_ShadowBlurMask = true; + public bool LIL_FEATURE_ShadowStrengthMask = true; + public bool LIL_FEATURE_ShadowColorTex = true; + public bool LIL_FEATURE_Shadow2ndColorTex = true; + public bool LIL_FEATURE_Shadow3rdColorTex = true; + public bool LIL_FEATURE_RimShadeMask = true; + public bool LIL_FEATURE_BacklightColorTex = true; + public bool LIL_FEATURE_SmoothnessTex = true; + public bool LIL_FEATURE_MetallicGlossMap = true; + public bool LIL_FEATURE_ReflectionColorTex = true; + public bool LIL_FEATURE_ReflectionCubeTex = true; + public bool LIL_FEATURE_MatCapTex = true; + public bool LIL_FEATURE_MatCapBlendMask = true; + public bool LIL_FEATURE_MatCapBumpMap = true; + public bool LIL_FEATURE_MatCap2ndTex = true; + public bool LIL_FEATURE_MatCap2ndBlendMask = true; + public bool LIL_FEATURE_MatCap2ndBumpMap = true; + public bool LIL_FEATURE_RimColorTex = true; + public bool LIL_FEATURE_GlitterColorTex = true; + public bool LIL_FEATURE_GlitterShapeTex = true; + public bool LIL_FEATURE_EmissionMap = true; + public bool LIL_FEATURE_EmissionBlendMask = true; + public bool LIL_FEATURE_EmissionGradTex = true; + public bool LIL_FEATURE_Emission2ndMap = true; + public bool LIL_FEATURE_Emission2ndBlendMask = true; + public bool LIL_FEATURE_Emission2ndGradTex = true; + public bool LIL_FEATURE_ParallaxMap = true; + public bool LIL_FEATURE_AudioLinkMask = true; + public bool LIL_FEATURE_AudioLinkLocalMap = true; + public bool LIL_FEATURE_DissolveMask = true; + public bool LIL_FEATURE_DissolveNoiseMask = true; + public bool LIL_FEATURE_OutlineTex = true; + public bool LIL_FEATURE_OutlineWidthMask = true; + public bool LIL_FEATURE_OutlineVectorTex = true; + public bool LIL_FEATURE_FurNoiseMask = true; + public bool LIL_FEATURE_FurMask = true; + public bool LIL_FEATURE_FurLengthMask = true; + public bool LIL_FEATURE_FurVectorTex = true; + + public bool LIL_OPTIMIZE_APPLY_SHADOW_FA = true; + public bool LIL_OPTIMIZE_USE_FORWARDADD = true; + public bool LIL_OPTIMIZE_USE_FORWARDADD_SHADOW = false; + public bool LIL_OPTIMIZE_USE_VERTEXLIGHT = true; + public bool LIL_OPTIMIZE_USE_LIGHTMAP = false; + public bool LIL_OPTIMIZE_DEFFERED = false; + + public bool isLocked = false; + public bool isDebugOptimize = false; + public bool isOptimizeInTestBuild = false; + public bool isOptimizeInNDMF = false; + public bool isMigrateInStartUp = true; + + public float defaultAsUnlit = 0.0f; + public float defaultVertexLightStrength = 0.0f; + public float defaultLightMinLimit = 0.05f; + public float defaultLightMaxLimit = 1.0f; + public float defaultBeforeExposureLimit = 10000.0f; + public float defaultMonochromeLighting = 0.0f; + public float defaultlilDirectionalLightStrength = 1.0f; + + public string mainLightModeName = ""; + public string outlineLightModeName = ""; + public string preLightModeName = ""; + public string furLightModeName = ""; + public string furPreLightModeName = ""; + public string gemPreLightModeName = ""; + + public lilToonPreset presetSkin; + public lilToonPreset presetFace; + public lilToonPreset presetHair; + public lilToonPreset presetCloth; + + private static HashSet logs = new HashSet(); + + // This is not a shader setting, but the version number is stored here for material migration. + public int previousVersion = 0; + + // Lock + internal static void SaveLockedSetting(lilToonSetting shaderSetting) + { + string path = lilDirectoryManager.GetSettingLockPath(); + File.WriteAllText(path, JsonUtility.ToJson(shaderSetting, true)); + if(!path.Contains("Packages")) AssetDatabase.Refresh(); + } + + internal static void LoadLockedSetting(ref lilToonSetting shaderSetting) + { + var lockedSetting = CreateInstance(); + string path = lilDirectoryManager.GetSettingLockPath(); + if(File.Exists(path)) + { + JsonUtility.FromJsonOverwrite(File.ReadAllText(path), lockedSetting); + shaderSetting.LIL_OPTIMIZE_APPLY_SHADOW_FA = lockedSetting.LIL_OPTIMIZE_APPLY_SHADOW_FA; + shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD = lockedSetting.LIL_OPTIMIZE_USE_FORWARDADD; + shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD_SHADOW = lockedSetting.LIL_OPTIMIZE_USE_FORWARDADD_SHADOW; + shaderSetting.LIL_OPTIMIZE_USE_LIGHTMAP = lockedSetting.LIL_OPTIMIZE_USE_LIGHTMAP; + shaderSetting.isDebugOptimize = lockedSetting.isDebugOptimize; + shaderSetting.isOptimizeInTestBuild = lockedSetting.isOptimizeInTestBuild; + shaderSetting.isMigrateInStartUp = lockedSetting.isMigrateInStartUp; + shaderSetting.mainLightModeName = lockedSetting.mainLightModeName; + shaderSetting.outlineLightModeName = lockedSetting.outlineLightModeName; + shaderSetting.preLightModeName = lockedSetting.preLightModeName; + shaderSetting.furLightModeName = lockedSetting.furLightModeName; + shaderSetting.furPreLightModeName = lockedSetting.furPreLightModeName; + shaderSetting.gemPreLightModeName = lockedSetting.gemPreLightModeName; + } + } + + internal static void DeleteLockedSetting() + { + string path = lilDirectoryManager.GetSettingLockPath(); + if(File.Exists(path)) File.Delete(path); + if(File.Exists(path+".meta")) File.Delete(path+".meta"); + if(!path.Contains("Packages")) AssetDatabase.Refresh(); + } + + // Save and Load + public static void SaveShaderSetting(lilToonSetting shaderSetting) + { + string shaderSettingPath = lilDirectoryManager.GetShaderSettingPath(); + var sw = new StreamWriter(shaderSettingPath, false); + sw.Write(JsonUtility.ToJson(shaderSetting, true)); + sw.Close(); + } + + internal static void LoadShaderSetting(ref lilToonSetting shaderSetting) + { + string shaderSettingPath = lilDirectoryManager.GetShaderSettingPath(); + if(shaderSetting == null) shaderSetting = CreateInstance(); + if(File.Exists(shaderSettingPath)) JsonUtility.FromJsonOverwrite(File.ReadAllText(shaderSettingPath), shaderSetting); + LoadLockedSetting(ref shaderSetting); + } + + internal static void InitializeShaderSetting(ref lilToonSetting shaderSetting) + { + if(shaderSetting != null) return; + LoadShaderSetting(ref shaderSetting); + if(shaderSetting == null) + { + foreach(var path in lilDirectoryManager.FindAssetsPath("t:lilToonSetting")) + { + var shaderSettingOld = AssetDatabase.LoadAssetAtPath(path); + shaderSetting = Instantiate(shaderSettingOld); + if(shaderSetting != null) + { + Debug.Log("[lilToon] Migrate settings from: " + path); + TurnOnAllShaderSetting(ref shaderSetting); + ApplyShaderSetting(shaderSetting); + AssetDatabase.Refresh(); + return; + } + } + shaderSetting = CreateInstance(); + SaveShaderSetting(shaderSetting); + AssetDatabase.Refresh(); + } + } + + public static void TurnOffAllShaderSetting(ref lilToonSetting shaderSetting) + { + if(shaderSetting == null) return; + shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV = false; + shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION = false; + shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP = false; + shaderSetting.LIL_FEATURE_MAIN2ND = false; + shaderSetting.LIL_FEATURE_MAIN3RD = false; + shaderSetting.LIL_FEATURE_DECAL = false; + shaderSetting.LIL_FEATURE_ANIMATE_DECAL = false; + shaderSetting.LIL_FEATURE_LAYER_DISSOLVE = false; + shaderSetting.LIL_FEATURE_ALPHAMASK = false; + shaderSetting.LIL_FEATURE_SHADOW = false; + shaderSetting.LIL_FEATURE_SHADOW_3RD = false; + shaderSetting.LIL_FEATURE_SHADOW_LUT = false; + shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = false; + shaderSetting.LIL_FEATURE_RIMSHADE = false; + shaderSetting.LIL_FEATURE_EMISSION_1ST = false; + shaderSetting.LIL_FEATURE_EMISSION_2ND = false; + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = false; + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = false; + shaderSetting.LIL_FEATURE_EMISSION_GRADATION = false; + shaderSetting.LIL_FEATURE_NORMAL_1ST = false; + shaderSetting.LIL_FEATURE_NORMAL_2ND = false; + shaderSetting.LIL_FEATURE_ANISOTROPY = false; + shaderSetting.LIL_FEATURE_REFLECTION = false; + shaderSetting.LIL_FEATURE_MATCAP = false; + shaderSetting.LIL_FEATURE_MATCAP_2ND = false; + shaderSetting.LIL_FEATURE_RIMLIGHT = false; + shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION = false; + shaderSetting.LIL_FEATURE_GLITTER = false; + shaderSetting.LIL_FEATURE_BACKLIGHT = false; + shaderSetting.LIL_FEATURE_PARALLAX = false; + shaderSetting.LIL_FEATURE_POM = false; + //shaderSetting.LIL_FEATURE_CLIPPING_CANCELLER = false; + shaderSetting.LIL_FEATURE_DISTANCE_FADE = false; + shaderSetting.LIL_FEATURE_AUDIOLINK = false; + shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX = false; + shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL = false; + shaderSetting.LIL_FEATURE_DISSOLVE = false; + shaderSetting.LIL_FEATURE_DITHER = false; + shaderSetting.LIL_FEATURE_IDMASK = false; + shaderSetting.LIL_FEATURE_UDIMDISCARD = false; + shaderSetting.LIL_FEATURE_ENCRYPTION = lilDirectoryManager.ExistsEncryption(); + shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV = false; + shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION = false; + shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW = false; + shaderSetting.LIL_FEATURE_FUR_COLLISION = false; + + shaderSetting.LIL_FEATURE_MainGradationTex = false; + shaderSetting.LIL_FEATURE_MainColorAdjustMask = false; + shaderSetting.LIL_FEATURE_Main2ndTex = false; + shaderSetting.LIL_FEATURE_Main2ndBlendMask = false; + shaderSetting.LIL_FEATURE_Main2ndDissolveMask = false; + shaderSetting.LIL_FEATURE_Main2ndDissolveNoiseMask = false; + shaderSetting.LIL_FEATURE_Main3rdTex = false; + shaderSetting.LIL_FEATURE_Main3rdBlendMask = false; + shaderSetting.LIL_FEATURE_Main3rdDissolveMask = false; + shaderSetting.LIL_FEATURE_Main3rdDissolveNoiseMask = false; + shaderSetting.LIL_FEATURE_AlphaMask = false; + shaderSetting.LIL_FEATURE_BumpMap = false; + shaderSetting.LIL_FEATURE_Bump2ndMap = false; + shaderSetting.LIL_FEATURE_Bump2ndScaleMask = false; + shaderSetting.LIL_FEATURE_AnisotropyTangentMap = false; + shaderSetting.LIL_FEATURE_AnisotropyScaleMask = false; + shaderSetting.LIL_FEATURE_AnisotropyShiftNoiseMask = false; + shaderSetting.LIL_FEATURE_ShadowBorderMask = false; + shaderSetting.LIL_FEATURE_ShadowBlurMask = false; + shaderSetting.LIL_FEATURE_ShadowStrengthMask = false; + shaderSetting.LIL_FEATURE_ShadowColorTex = false; + shaderSetting.LIL_FEATURE_Shadow2ndColorTex = false; + shaderSetting.LIL_FEATURE_Shadow3rdColorTex = false; + shaderSetting.LIL_FEATURE_RimShadeMask = false; + shaderSetting.LIL_FEATURE_BacklightColorTex = false; + shaderSetting.LIL_FEATURE_SmoothnessTex = false; + shaderSetting.LIL_FEATURE_MetallicGlossMap = false; + shaderSetting.LIL_FEATURE_ReflectionColorTex = false; + shaderSetting.LIL_FEATURE_ReflectionCubeTex = false; + shaderSetting.LIL_FEATURE_MatCapTex = false; + shaderSetting.LIL_FEATURE_MatCapBlendMask = false; + shaderSetting.LIL_FEATURE_MatCapBumpMap = false; + shaderSetting.LIL_FEATURE_MatCap2ndTex = false; + shaderSetting.LIL_FEATURE_MatCap2ndBlendMask = false; + shaderSetting.LIL_FEATURE_MatCap2ndBumpMap = false; + shaderSetting.LIL_FEATURE_RimColorTex = false; + shaderSetting.LIL_FEATURE_GlitterColorTex = false; + shaderSetting.LIL_FEATURE_GlitterShapeTex = false; + shaderSetting.LIL_FEATURE_EmissionMap = false; + shaderSetting.LIL_FEATURE_EmissionBlendMask = false; + shaderSetting.LIL_FEATURE_EmissionGradTex = false; + shaderSetting.LIL_FEATURE_Emission2ndMap = false; + shaderSetting.LIL_FEATURE_Emission2ndBlendMask = false; + shaderSetting.LIL_FEATURE_Emission2ndGradTex = false; + shaderSetting.LIL_FEATURE_ParallaxMap = false; + shaderSetting.LIL_FEATURE_AudioLinkMask = false; + shaderSetting.LIL_FEATURE_AudioLinkLocalMap = false; + shaderSetting.LIL_FEATURE_DissolveMask = false; + shaderSetting.LIL_FEATURE_DissolveNoiseMask = false; + shaderSetting.LIL_FEATURE_OutlineTex = false; + shaderSetting.LIL_FEATURE_OutlineWidthMask = false; + shaderSetting.LIL_FEATURE_OutlineVectorTex = false; + shaderSetting.LIL_FEATURE_FurNoiseMask = false; + shaderSetting.LIL_FEATURE_FurMask = false; + shaderSetting.LIL_FEATURE_FurLengthMask = false; + shaderSetting.LIL_FEATURE_FurVectorTex = false; + shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = false; + EditorUtility.SetDirty(shaderSetting); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + } + + public static void TurnOnAllShaderSetting(ref lilToonSetting shaderSetting) + { + if(shaderSetting == null) return; + shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV = true; + shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION = true; + shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP = true; + shaderSetting.LIL_FEATURE_MAIN2ND = true; + shaderSetting.LIL_FEATURE_MAIN3RD = true; + shaderSetting.LIL_FEATURE_DECAL = true; + shaderSetting.LIL_FEATURE_ANIMATE_DECAL = true; + shaderSetting.LIL_FEATURE_LAYER_DISSOLVE = true; + shaderSetting.LIL_FEATURE_ALPHAMASK = true; + shaderSetting.LIL_FEATURE_SHADOW = true; + shaderSetting.LIL_FEATURE_SHADOW_3RD = true; + shaderSetting.LIL_FEATURE_SHADOW_LUT = true; + shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = true; + shaderSetting.LIL_FEATURE_RIMSHADE = true; + shaderSetting.LIL_FEATURE_EMISSION_1ST = true; + shaderSetting.LIL_FEATURE_EMISSION_2ND = true; + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = true; + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = true; + shaderSetting.LIL_FEATURE_EMISSION_GRADATION = true; + shaderSetting.LIL_FEATURE_NORMAL_1ST = true; + shaderSetting.LIL_FEATURE_NORMAL_2ND = true; + shaderSetting.LIL_FEATURE_ANISOTROPY = true; + shaderSetting.LIL_FEATURE_REFLECTION = true; + shaderSetting.LIL_FEATURE_MATCAP = true; + shaderSetting.LIL_FEATURE_MATCAP_2ND = true; + shaderSetting.LIL_FEATURE_RIMLIGHT = true; + shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION = true; + shaderSetting.LIL_FEATURE_GLITTER = true; + shaderSetting.LIL_FEATURE_BACKLIGHT = true; + shaderSetting.LIL_FEATURE_PARALLAX = true; + shaderSetting.LIL_FEATURE_POM = true; + //shaderSetting.LIL_FEATURE_CLIPPING_CANCELLER = true; + shaderSetting.LIL_FEATURE_DISTANCE_FADE = true; + shaderSetting.LIL_FEATURE_AUDIOLINK = true; + shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX = true; + shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL = true; + shaderSetting.LIL_FEATURE_DISSOLVE = true; + shaderSetting.LIL_FEATURE_DITHER = true; + shaderSetting.LIL_FEATURE_IDMASK = true; + shaderSetting.LIL_FEATURE_UDIMDISCARD = true; + shaderSetting.LIL_FEATURE_ENCRYPTION = lilDirectoryManager.ExistsEncryption(); + shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV = true; + shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION = true; + shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW = true; + shaderSetting.LIL_FEATURE_FUR_COLLISION = true; + shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = true; + + if(!lilShaderAPI.IsTextureLimitedAPI()) + { + shaderSetting.LIL_FEATURE_MainGradationTex = true; + shaderSetting.LIL_FEATURE_MainColorAdjustMask = true; + shaderSetting.LIL_FEATURE_Main2ndTex = true; + shaderSetting.LIL_FEATURE_Main2ndBlendMask = true; + shaderSetting.LIL_FEATURE_Main2ndDissolveMask = true; + shaderSetting.LIL_FEATURE_Main2ndDissolveNoiseMask = true; + shaderSetting.LIL_FEATURE_Main3rdTex = true; + shaderSetting.LIL_FEATURE_Main3rdBlendMask = true; + shaderSetting.LIL_FEATURE_Main3rdDissolveMask = true; + shaderSetting.LIL_FEATURE_Main3rdDissolveNoiseMask = true; + shaderSetting.LIL_FEATURE_AlphaMask = true; + shaderSetting.LIL_FEATURE_BumpMap = true; + shaderSetting.LIL_FEATURE_Bump2ndMap = true; + shaderSetting.LIL_FEATURE_Bump2ndScaleMask = true; + shaderSetting.LIL_FEATURE_AnisotropyTangentMap = true; + shaderSetting.LIL_FEATURE_AnisotropyScaleMask = true; + shaderSetting.LIL_FEATURE_AnisotropyShiftNoiseMask = true; + shaderSetting.LIL_FEATURE_ShadowBorderMask = true; + shaderSetting.LIL_FEATURE_ShadowBlurMask = true; + shaderSetting.LIL_FEATURE_ShadowStrengthMask = true; + shaderSetting.LIL_FEATURE_ShadowColorTex = true; + shaderSetting.LIL_FEATURE_Shadow2ndColorTex = true; + shaderSetting.LIL_FEATURE_Shadow3rdColorTex = true; + shaderSetting.LIL_FEATURE_RimShadeMask = true; + shaderSetting.LIL_FEATURE_BacklightColorTex = true; + shaderSetting.LIL_FEATURE_SmoothnessTex = true; + shaderSetting.LIL_FEATURE_MetallicGlossMap = true; + shaderSetting.LIL_FEATURE_ReflectionColorTex = true; + shaderSetting.LIL_FEATURE_ReflectionCubeTex = true; + shaderSetting.LIL_FEATURE_MatCapTex = true; + shaderSetting.LIL_FEATURE_MatCapBlendMask = true; + shaderSetting.LIL_FEATURE_MatCapBumpMap = true; + shaderSetting.LIL_FEATURE_MatCap2ndTex = true; + shaderSetting.LIL_FEATURE_MatCap2ndBlendMask = true; + shaderSetting.LIL_FEATURE_MatCap2ndBumpMap = true; + shaderSetting.LIL_FEATURE_RimColorTex = true; + shaderSetting.LIL_FEATURE_GlitterColorTex = true; + shaderSetting.LIL_FEATURE_GlitterShapeTex = true; + shaderSetting.LIL_FEATURE_EmissionMap = true; + shaderSetting.LIL_FEATURE_EmissionBlendMask = true; + shaderSetting.LIL_FEATURE_EmissionGradTex = true; + shaderSetting.LIL_FEATURE_Emission2ndMap = true; + shaderSetting.LIL_FEATURE_Emission2ndBlendMask = true; + shaderSetting.LIL_FEATURE_Emission2ndGradTex = true; + shaderSetting.LIL_FEATURE_ParallaxMap = true; + shaderSetting.LIL_FEATURE_AudioLinkMask = true; + shaderSetting.LIL_FEATURE_AudioLinkLocalMap = true; + shaderSetting.LIL_FEATURE_DissolveMask = true; + shaderSetting.LIL_FEATURE_DissolveNoiseMask = true; + shaderSetting.LIL_FEATURE_OutlineTex = true; + shaderSetting.LIL_FEATURE_OutlineWidthMask = true; + shaderSetting.LIL_FEATURE_OutlineVectorTex = true; + shaderSetting.LIL_FEATURE_FurNoiseMask = true; + shaderSetting.LIL_FEATURE_FurMask = true; + shaderSetting.LIL_FEATURE_FurLengthMask = true; + shaderSetting.LIL_FEATURE_FurVectorTex = true; + } + } + + internal static void ApplyShaderSetting(lilToonSetting shaderSetting, string reportTitle = null) + { + SaveShaderSetting(shaderSetting); + string shaderSettingString = BuildShaderSettingString(shaderSetting, true); + + string shaderFolderPath = lilDirectoryManager.GetShaderFolderPath(); + string baseShaderFolderPath = lilDirectoryManager.GetBaseShaderFolderPath(); + foreach(var baseShaderPath in lilDirectoryManager.FindAssetsPath("", new[] {baseShaderFolderPath}).Where(p => p.Contains(".lilinternal"))) + { + string shaderPath = shaderFolderPath + Path.AltDirectorySeparatorChar + Path.GetFileNameWithoutExtension(baseShaderPath) + ".shader"; + File.WriteAllText(shaderPath, lilShaderContainer.UnpackContainer(baseShaderPath)); + } + foreach(var folder in lilDirectoryManager.FindAssetsPath("t:shader").Where(p => p.Contains(".lilcontainer")).Select(p => Path.GetDirectoryName(p)).Distinct()) + { + AssetDatabase.ImportAsset(folder, ImportAssetOptions.ImportRecursive); + } + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + if(!string.IsNullOrEmpty(reportTitle)) + { + Debug.Log(reportTitle + Environment.NewLine + shaderSettingString); + } + } + + internal static void ApplyShaderSetting(lilToonSetting shaderSetting, string reportTitle, List shaders, bool doOptimize = false) + { + if(shaders == null || shaders.Count() == 0) + { + ApplyShaderSetting(shaderSetting, reportTitle); + return; + } + + SaveShaderSetting(shaderSetting); + string shaderSettingString = BuildShaderSettingString(shaderSetting, true); + + string baseShaderFolderPath = lilDirectoryManager.GetBaseShaderFolderPath(); + var shaderPathes = new List(); + foreach(var shader in shaders) + { + string shaderPath = AssetDatabase.GetAssetPath(shader); + if(string.IsNullOrEmpty(shaderPath)) continue; + if(!shaderPathes.Contains(shaderPath)) shaderPathes.Add(shaderPath); + if(shaderPath.Contains(".lilcontainer")) continue; + + string baseShaderPath = baseShaderFolderPath + Path.AltDirectorySeparatorChar + Path.GetFileNameWithoutExtension(shaderPath) + ".lilinternal"; + if(!File.Exists(baseShaderPath)) continue; + File.WriteAllText(shaderPath, lilShaderContainer.UnpackContainer(baseShaderPath, null, doOptimize)); + } + foreach(var shaderPath in shaderPathes) + { + AssetDatabase.ImportAsset(shaderPath, ImportAssetOptions.ForceSynchronousImport); + } + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + if(!string.IsNullOrEmpty(reportTitle)) + { + Debug.Log(reportTitle + Environment.NewLine + shaderSettingString); + } + } + + public static string BuildShaderSettingString(lilToonSetting shaderSetting, bool isFile) + { + var sb = new StringBuilder(); + if(isFile) + { + sb.AppendLine("#ifndef LIL_SETTING_INCLUDED"); + sb.AppendLine("#define LIL_SETTING_INCLUDED"); + sb.AppendLine(""); + } + if(shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV) sb.AppendLine("#define LIL_FEATURE_ANIMATE_MAIN_UV"); + if(shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION) sb.AppendLine("#define LIL_FEATURE_MAIN_TONE_CORRECTION"); + if(shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP) sb.AppendLine("#define LIL_FEATURE_MAIN_GRADATION_MAP"); + if(shaderSetting.LIL_FEATURE_MAIN2ND) sb.AppendLine("#define LIL_FEATURE_MAIN2ND"); + if(shaderSetting.LIL_FEATURE_MAIN3RD) sb.AppendLine("#define LIL_FEATURE_MAIN3RD"); + if(shaderSetting.LIL_FEATURE_MAIN2ND || shaderSetting.LIL_FEATURE_MAIN3RD) + { + if(shaderSetting.LIL_FEATURE_DECAL) sb.AppendLine("#define LIL_FEATURE_DECAL"); + if(shaderSetting.LIL_FEATURE_ANIMATE_DECAL) sb.AppendLine("#define LIL_FEATURE_ANIMATE_DECAL"); + if(shaderSetting.LIL_FEATURE_LAYER_DISSOLVE) sb.AppendLine("#define LIL_FEATURE_LAYER_DISSOLVE"); + } + + if(shaderSetting.LIL_FEATURE_ALPHAMASK) sb.AppendLine("#define LIL_FEATURE_ALPHAMASK"); + + if(shaderSetting.LIL_FEATURE_SHADOW) + { + sb.AppendLine("#define LIL_FEATURE_SHADOW"); + if(shaderSetting.LIL_FEATURE_RECEIVE_SHADOW) sb.AppendLine("#define LIL_FEATURE_RECEIVE_SHADOW"); + if(shaderSetting.LIL_FEATURE_SHADOW_3RD) sb.AppendLine("#define LIL_FEATURE_SHADOW_3RD"); + if(shaderSetting.LIL_FEATURE_SHADOW_LUT) sb.AppendLine("#define LIL_FEATURE_SHADOW_LUT"); + } + if(shaderSetting.LIL_FEATURE_RIMSHADE) sb.AppendLine("#define LIL_FEATURE_RIMSHADE"); + + if(shaderSetting.LIL_FEATURE_EMISSION_1ST) sb.AppendLine("#define LIL_FEATURE_EMISSION_1ST"); + if(shaderSetting.LIL_FEATURE_EMISSION_2ND) sb.AppendLine("#define LIL_FEATURE_EMISSION_2ND"); + if(shaderSetting.LIL_FEATURE_EMISSION_1ST || shaderSetting.LIL_FEATURE_EMISSION_2ND) + { + if(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV) sb.AppendLine("#define LIL_FEATURE_ANIMATE_EMISSION_UV"); + if(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) sb.AppendLine("#define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV"); + if(shaderSetting.LIL_FEATURE_EMISSION_GRADATION) sb.AppendLine("#define LIL_FEATURE_EMISSION_GRADATION"); + } + if(shaderSetting.LIL_FEATURE_NORMAL_1ST) sb.AppendLine("#define LIL_FEATURE_NORMAL_1ST"); + if(shaderSetting.LIL_FEATURE_NORMAL_2ND) sb.AppendLine("#define LIL_FEATURE_NORMAL_2ND"); + if(shaderSetting.LIL_FEATURE_ANISOTROPY) sb.AppendLine("#define LIL_FEATURE_ANISOTROPY"); + if(shaderSetting.LIL_FEATURE_REFLECTION) sb.AppendLine("#define LIL_FEATURE_REFLECTION"); + if(shaderSetting.LIL_FEATURE_MATCAP) sb.AppendLine("#define LIL_FEATURE_MATCAP"); + if(shaderSetting.LIL_FEATURE_MATCAP_2ND) sb.AppendLine("#define LIL_FEATURE_MATCAP_2ND"); + if(shaderSetting.LIL_FEATURE_RIMLIGHT) + { + sb.AppendLine("#define LIL_FEATURE_RIMLIGHT"); + if(shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION) sb.AppendLine("#define LIL_FEATURE_RIMLIGHT_DIRECTION"); + } + if(shaderSetting.LIL_FEATURE_GLITTER) sb.AppendLine("#define LIL_FEATURE_GLITTER"); + if(shaderSetting.LIL_FEATURE_BACKLIGHT) sb.AppendLine("#define LIL_FEATURE_BACKLIGHT"); + if(shaderSetting.LIL_FEATURE_PARALLAX) + { + sb.AppendLine("#define LIL_FEATURE_PARALLAX"); + if(shaderSetting.LIL_FEATURE_POM) sb.AppendLine("#define LIL_FEATURE_POM"); + } + if(shaderSetting.LIL_FEATURE_CLIPPING_CANCELLER) sb.AppendLine("#define LIL_FEATURE_CLIPPING_CANCELLER"); + if(shaderSetting.LIL_FEATURE_DISTANCE_FADE) sb.AppendLine("#define LIL_FEATURE_DISTANCE_FADE"); + if(shaderSetting.LIL_FEATURE_AUDIOLINK) + { + sb.AppendLine("#define LIL_FEATURE_AUDIOLINK"); + if(shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX) sb.AppendLine("#define LIL_FEATURE_AUDIOLINK_VERTEX"); + if(shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL) sb.AppendLine("#define LIL_FEATURE_AUDIOLINK_LOCAL"); + } + if(shaderSetting.LIL_FEATURE_DISSOLVE) sb.AppendLine("#define LIL_FEATURE_DISSOLVE"); + if(shaderSetting.LIL_FEATURE_DITHER) sb.AppendLine("#define LIL_FEATURE_DITHER"); + if(shaderSetting.LIL_FEATURE_IDMASK) sb.AppendLine("#define LIL_FEATURE_IDMASK"); + if(shaderSetting.LIL_FEATURE_UDIMDISCARD) sb.AppendLine("#define LIL_FEATURE_UDIMDISCARD"); + if(shaderSetting.LIL_FEATURE_ENCRYPTION) sb.AppendLine("#define LIL_FEATURE_ENCRYPTION"); + if(shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION) sb.AppendLine("#define LIL_FEATURE_OUTLINE_TONE_CORRECTION"); + if(shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW) sb.AppendLine("#define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW"); + if(shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV) sb.AppendLine("#define LIL_FEATURE_ANIMATE_OUTLINE_UV"); + if(shaderSetting.LIL_FEATURE_FUR_COLLISION) sb.AppendLine("#define LIL_FEATURE_FUR_COLLISION"); + + if(shaderSetting.LIL_FEATURE_MainGradationTex) sb.AppendLine("#define LIL_FEATURE_MainGradationTex"); + if(shaderSetting.LIL_FEATURE_MainColorAdjustMask) sb.AppendLine("#define LIL_FEATURE_MainColorAdjustMask"); + if(shaderSetting.LIL_FEATURE_Main2ndTex) sb.AppendLine("#define LIL_FEATURE_Main2ndTex"); + if(shaderSetting.LIL_FEATURE_Main2ndBlendMask) sb.AppendLine("#define LIL_FEATURE_Main2ndBlendMask"); + if(shaderSetting.LIL_FEATURE_Main2ndDissolveMask) sb.AppendLine("#define LIL_FEATURE_Main2ndDissolveMask"); + if(shaderSetting.LIL_FEATURE_Main2ndDissolveNoiseMask) sb.AppendLine("#define LIL_FEATURE_Main2ndDissolveNoiseMask"); + if(shaderSetting.LIL_FEATURE_Main3rdTex) sb.AppendLine("#define LIL_FEATURE_Main3rdTex"); + if(shaderSetting.LIL_FEATURE_Main3rdBlendMask) sb.AppendLine("#define LIL_FEATURE_Main3rdBlendMask"); + if(shaderSetting.LIL_FEATURE_Main3rdDissolveMask) sb.AppendLine("#define LIL_FEATURE_Main3rdDissolveMask"); + if(shaderSetting.LIL_FEATURE_Main3rdDissolveNoiseMask) sb.AppendLine("#define LIL_FEATURE_Main3rdDissolveNoiseMask"); + if(shaderSetting.LIL_FEATURE_AlphaMask) sb.AppendLine("#define LIL_FEATURE_AlphaMask"); + if(shaderSetting.LIL_FEATURE_BumpMap) sb.AppendLine("#define LIL_FEATURE_BumpMap"); + if(shaderSetting.LIL_FEATURE_Bump2ndMap) sb.AppendLine("#define LIL_FEATURE_Bump2ndMap"); + if(shaderSetting.LIL_FEATURE_Bump2ndScaleMask) sb.AppendLine("#define LIL_FEATURE_Bump2ndScaleMask"); + if(shaderSetting.LIL_FEATURE_AnisotropyTangentMap) sb.AppendLine("#define LIL_FEATURE_AnisotropyTangentMap"); + if(shaderSetting.LIL_FEATURE_AnisotropyScaleMask) sb.AppendLine("#define LIL_FEATURE_AnisotropyScaleMask"); + if(shaderSetting.LIL_FEATURE_AnisotropyShiftNoiseMask) sb.AppendLine("#define LIL_FEATURE_AnisotropyShiftNoiseMask"); + if(shaderSetting.LIL_FEATURE_ShadowBorderMask) sb.AppendLine("#define LIL_FEATURE_ShadowBorderMask"); + if(shaderSetting.LIL_FEATURE_ShadowBlurMask) sb.AppendLine("#define LIL_FEATURE_ShadowBlurMask"); + if(shaderSetting.LIL_FEATURE_ShadowStrengthMask) sb.AppendLine("#define LIL_FEATURE_ShadowStrengthMask"); + if(shaderSetting.LIL_FEATURE_ShadowColorTex) sb.AppendLine("#define LIL_FEATURE_ShadowColorTex"); + if(shaderSetting.LIL_FEATURE_Shadow2ndColorTex) sb.AppendLine("#define LIL_FEATURE_Shadow2ndColorTex"); + if(shaderSetting.LIL_FEATURE_Shadow3rdColorTex) sb.AppendLine("#define LIL_FEATURE_Shadow3rdColorTex"); + if(shaderSetting.LIL_FEATURE_RimShadeMask) sb.AppendLine("#define LIL_FEATURE_RimShadeMask"); + if(shaderSetting.LIL_FEATURE_BacklightColorTex) sb.AppendLine("#define LIL_FEATURE_BacklightColorTex"); + if(shaderSetting.LIL_FEATURE_SmoothnessTex) sb.AppendLine("#define LIL_FEATURE_SmoothnessTex"); + if(shaderSetting.LIL_FEATURE_MetallicGlossMap) sb.AppendLine("#define LIL_FEATURE_MetallicGlossMap"); + if(shaderSetting.LIL_FEATURE_ReflectionColorTex) sb.AppendLine("#define LIL_FEATURE_ReflectionColorTex"); + if(shaderSetting.LIL_FEATURE_ReflectionCubeTex) sb.AppendLine("#define LIL_FEATURE_ReflectionCubeTex"); + if(shaderSetting.LIL_FEATURE_MatCapTex) sb.AppendLine("#define LIL_FEATURE_MatCapTex"); + if(shaderSetting.LIL_FEATURE_MatCapBlendMask) sb.AppendLine("#define LIL_FEATURE_MatCapBlendMask"); + if(shaderSetting.LIL_FEATURE_MatCapBumpMap) sb.AppendLine("#define LIL_FEATURE_MatCapBumpMap"); + if(shaderSetting.LIL_FEATURE_MatCap2ndTex) sb.AppendLine("#define LIL_FEATURE_MatCap2ndTex"); + if(shaderSetting.LIL_FEATURE_MatCap2ndBlendMask) sb.AppendLine("#define LIL_FEATURE_MatCap2ndBlendMask"); + if(shaderSetting.LIL_FEATURE_MatCap2ndBumpMap) sb.AppendLine("#define LIL_FEATURE_MatCap2ndBumpMap"); + if(shaderSetting.LIL_FEATURE_RimColorTex) sb.AppendLine("#define LIL_FEATURE_RimColorTex"); + if(shaderSetting.LIL_FEATURE_GlitterColorTex) sb.AppendLine("#define LIL_FEATURE_GlitterColorTex"); + if(shaderSetting.LIL_FEATURE_GlitterShapeTex) sb.AppendLine("#define LIL_FEATURE_GlitterShapeTex"); + if(shaderSetting.LIL_FEATURE_EmissionMap) sb.AppendLine("#define LIL_FEATURE_EmissionMap"); + if(shaderSetting.LIL_FEATURE_EmissionBlendMask) sb.AppendLine("#define LIL_FEATURE_EmissionBlendMask"); + if(shaderSetting.LIL_FEATURE_EmissionGradTex) sb.AppendLine("#define LIL_FEATURE_EmissionGradTex"); + if(shaderSetting.LIL_FEATURE_Emission2ndMap) sb.AppendLine("#define LIL_FEATURE_Emission2ndMap"); + if(shaderSetting.LIL_FEATURE_Emission2ndBlendMask) sb.AppendLine("#define LIL_FEATURE_Emission2ndBlendMask"); + if(shaderSetting.LIL_FEATURE_Emission2ndGradTex) sb.AppendLine("#define LIL_FEATURE_Emission2ndGradTex"); + if(shaderSetting.LIL_FEATURE_ParallaxMap) sb.AppendLine("#define LIL_FEATURE_ParallaxMap"); + if(shaderSetting.LIL_FEATURE_AudioLinkMask) sb.AppendLine("#define LIL_FEATURE_AudioLinkMask"); + if(shaderSetting.LIL_FEATURE_AudioLinkLocalMap) sb.AppendLine("#define LIL_FEATURE_AudioLinkLocalMap"); + if(shaderSetting.LIL_FEATURE_DissolveMask) sb.AppendLine("#define LIL_FEATURE_DissolveMask"); + if(shaderSetting.LIL_FEATURE_DissolveNoiseMask) sb.AppendLine("#define LIL_FEATURE_DissolveNoiseMask"); + if(shaderSetting.LIL_FEATURE_OutlineTex) sb.AppendLine("#define LIL_FEATURE_OutlineTex"); + if(shaderSetting.LIL_FEATURE_OutlineWidthMask) sb.AppendLine("#define LIL_FEATURE_OutlineWidthMask"); + if(shaderSetting.LIL_FEATURE_OutlineVectorTex) sb.AppendLine("#define LIL_FEATURE_OutlineVectorTex"); + if(shaderSetting.LIL_FEATURE_FurNoiseMask) sb.AppendLine("#define LIL_FEATURE_FurNoiseMask"); + if(shaderSetting.LIL_FEATURE_FurMask) sb.AppendLine("#define LIL_FEATURE_FurMask"); + if(shaderSetting.LIL_FEATURE_FurLengthMask) sb.AppendLine("#define LIL_FEATURE_FurLengthMask"); + if(shaderSetting.LIL_FEATURE_FurVectorTex) sb.AppendLine("#define LIL_FEATURE_FurVectorTex"); + + if(shaderSetting.LIL_OPTIMIZE_APPLY_SHADOW_FA) sb.AppendLine("#define LIL_OPTIMIZE_APPLY_SHADOW_FA"); + if(shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD) sb.AppendLine("#define LIL_OPTIMIZE_USE_FORWARDADD"); + if(shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD_SHADOW) sb.AppendLine("#define LIL_OPTIMIZE_USE_FORWARDADD_SHADOW"); + if(shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT) sb.AppendLine("#define LIL_OPTIMIZE_USE_VERTEXLIGHT"); + if(shaderSetting.LIL_OPTIMIZE_USE_LIGHTMAP) sb.AppendLine("#define LIL_OPTIMIZE_USE_LIGHTMAP"); + if(isFile) + { + sb.AppendLine(""); + sb.AppendLine("#endif"); + } + + if(!isFile) + { + if(!shaderSetting.LIL_FEATURE_REFLECTION) sb.AppendLine("#pragma lil_skip_variants_reflections"); + if(!shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT) sb.AppendLine("#pragma lil_skip_variants_addlight"); + if(!shaderSetting.LIL_OPTIMIZE_USE_LIGHTMAP) sb.AppendLine("#pragma lil_skip_variants_lightmaps"); + } + return sb.ToString(); + } + + public static string BuildShaderSettingString(bool isFile) + { + lilToonSetting shaderSetting = null; + InitializeShaderSetting(ref shaderSetting); + return BuildShaderSettingString(shaderSetting, isFile); + } + + public static string BuildShaderSettingString(bool isFile, ref bool useBaseShadow, ref bool useOutlineShadow) + { + lilToonSetting shaderSetting = null; + InitializeShaderSetting(ref shaderSetting); + useBaseShadow = (shaderSetting.LIL_FEATURE_SHADOW && shaderSetting.LIL_FEATURE_RECEIVE_SHADOW) || shaderSetting.LIL_FEATURE_BACKLIGHT; + useOutlineShadow = shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW; + string shaderSettingString = BuildShaderSettingString(shaderSetting, isFile); + return shaderSettingString; + } + + internal static void WalkAllSceneReferencedAssets(Action callback, bool loadBuildScene) + { + Debug.Log("WalkAllSceneReferencedAssets"); + + var toVisit = new Queue(); + var visited = new HashSet(); + + if(loadBuildScene) + { + var startScenePath = UnityEngine.SceneManagement.SceneManager.GetActiveScene().path; + for(int i = -1; i < UnityEngine.SceneManagement.SceneManager.sceneCountInBuildSettings; i++) + { + if(i >= 0) UnityEditor.SceneManagement.EditorSceneManager.OpenScene(UnityEngine.SceneManagement.SceneUtility.GetScenePathByBuildIndex(i)); + WalkAllSceneReferencedAssets(callback, toVisit, visited); + } + UnityEditor.SceneManagement.EditorSceneManager.OpenScene(startScenePath); + } + else + { + WalkAllSceneReferencedAssets(callback, toVisit, visited); + } + } + + private static void WalkAllSceneReferencedAssets(Action callback, Queue toVisit, HashSet visited) + { + void Add(Object o) + { + if(!o || visited.Contains(o)) return; + toVisit.Enqueue(o); + visited.Add(o); + } + + foreach(var root in UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects()) + Add(root.transform); + + // use unity reflection to walk all properties in all objects referenced from the scene + while(toVisit.Count > 0) + { + var next = toVisit.Dequeue(); + if(next == null) continue; + + callback.Invoke(next); + + if( + next is Mesh || + next is Texture || + next is Shader || + next is TextAsset || + next.GetType() == typeof(Object) + ) continue; + + if(next is Transform) + { + var t = next as Transform; + foreach(Transform child in t) Add(child); + + foreach(var c in t.GetComponents(typeof(Component))) + if(!(c is Transform)) Add(c); + } + else + using(var so = new SerializedObject(next)) + using(var prop = so.GetIterator()) + { + bool enterChildren = true; + while(prop.Next(enterChildren)) + { + enterChildren = prop.propertyType != SerializedPropertyType.String; + if(prop.propertyType == SerializedPropertyType.ObjectReference) + Add(prop.objectReferenceValue); + } + } + } + } + + internal static void ApplyShaderSettingOptimized(bool loadBuildScene = true, List shaders = null) + { + lilToonSetting shaderSetting = null; + InitializeShaderSetting(ref shaderSetting); + TurnOffAllShaderSetting(ref shaderSetting); + + WalkAllSceneReferencedAssets(obj => + { + if (obj is Material) + { + SetupShaderSettingFromMaterial((Material)obj, ref shaderSetting); + } else if (obj is AnimationClip) + { + SetupShaderSettingFromAnimationClip((AnimationClip)obj, ref shaderSetting); + } + }, loadBuildScene); + + // Apply + ApplyShaderSetting(shaderSetting, "[lilToon] PreprocessBuild", shaders); + AssetDatabase.Refresh(); + } + + internal static void GetOptimizedSetting(Material[] materials, AnimationClip[] clips, out string usedShaders, out string optimizedHLSL, out string shaderSettingText) + { + usedShaders = null; + optimizedHLSL = null; + shaderSettingText = null; + + var shaders = GetShaderListFromGameObject(materials, clips); + if(shaders.Count() == 0) return; + + usedShaders = string.Join(Environment.NewLine, shaders.Select(s => s.name).Distinct().ToArray()); + + lilToonSetting shaderSetting = null; + InitializeShaderSetting(ref shaderSetting); + TurnOffAllShaderSetting(ref shaderSetting); + + optimizedHLSL = lilOptimizer.GetOptimizedText(materials, clips); + + // Get materials + foreach(var material in materials) + { + SetupShaderSettingFromMaterial(material, ref shaderSetting); + } + + // Get animations + foreach(var clip in clips) + { + SetupShaderSettingFromAnimationClip(clip, ref shaderSetting, true); + } + + shaderSettingText = BuildShaderSettingString(shaderSetting, false); + } + + #if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER) + private static bool WorkaroundForUsePassBug() + { + // Normally, there is no problem if you update Unity. + // This workaround exists for unusual cases. + // https://issuetracker.unity3d.com/issues/crash-on-malloc-internal-when-recompiling-a-shadergraph-used-by-another-shader-via-usepass + var regex = new Regex(@"(\d*)\.(\d*)\.(\d*)"); + var match = regex.Match(Application.unityVersion); + + if(!match.Success) return true; + var major = int.Parse(match.Groups[1].Value); + var minor = int.Parse(match.Groups[2].Value); + var patch = int.Parse(match.Groups[3].Value); + + if(major == 2022 && (minor < 3 || patch < 14)) return true; + if(major == 2023 && patch < 20) return true; + + return false; + } + #endif + + internal static void SetShaderSettingBeforeBuild(Material[] materials, AnimationClip[] clips) + { + #if !LILTOON_DISABLE_OPTIMIZATION + #if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER) + if(WorkaroundForUsePassBug()){ Debug.Log("[lilToon] Skip Optimization"); return; } + #endif + try + { + logs.Clear(); + #if UNITY_2022_1_OR_NEWER + var materialParents = new HashSet(); + foreach(var m in materials) + { + GetMaterialParents(materialParents, m); + } + materials = materials.Union(materialParents).ToArray(); + #endif + if(!ShouldOptimization()) return; + var shaders = GetShaderListFromGameObject(materials, clips); + if(shaders.Count() == 0) return; + + lilEditorParameters.instance.modifiedShaders = string.Join(",", shaders.Select(s => s.name).Distinct().ToArray()); + + lilToonSetting shaderSetting = null; + InitializeShaderSetting(ref shaderSetting); + TurnOffAllShaderSetting(ref shaderSetting); + + lilOptimizer.OptimizeInputHLSL(materials, clips); + + // Get materials + foreach(var material in materials) + { + SetupShaderSettingFromMaterial(material, ref shaderSetting); + } + + // Get animations + foreach(var clip in clips) + { + SetupShaderSettingFromAnimationClip(clip, ref shaderSetting, true); + } + + // Apply + ApplyShaderSetting(shaderSetting, "[lilToon] PreprocessBuild", shaders, true); + AssetDatabase.Refresh(); + Debug.Log(string.Join(Environment.NewLine, logs)); + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] SetShaderSettingBeforeBuild() failed"); + } + #endif + } + + #if UNITY_2022_1_OR_NEWER + private static void GetMaterialParents(HashSet parents, Material material) + { + if(!material || !material.parent) return; + var p = material.parent; + parents.Add(p); + GetMaterialParents(parents, p); + } + #endif + + internal static void SetShaderSettingBeforeBuild(bool loadBuildScene = true) + { + #if !LILTOON_DISABLE_OPTIMIZATION + #if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER) + if(WorkaroundForUsePassBug()){ Debug.Log("[lilToon] Skip Optimization"); return; } + #endif + try + { + if(!ShouldOptimization()) return; + logs.Clear(); + var shaders = GetShaderListFromProject(); + lilEditorParameters.instance.modifiedShaders = string.Join(",", shaders.Select(s => s.name).Distinct().ToArray()); + ApplyShaderSettingOptimized(loadBuildScene, shaders); + Debug.Log(string.Join(Environment.NewLine, logs)); + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] Optimization failed"); + } + #endif + } + + internal static void SetShaderSettingAfterBuild() + { + try + { + if(string.IsNullOrEmpty(lilEditorParameters.instance.modifiedShaders)) return; + var shaders = lilEditorParameters.instance.modifiedShaders.Split(',').Select(n => Shader.Find(n)).Where(s => s != null).ToList(); + lilEditorParameters.instance.modifiedShaders = ""; + if(!ShouldOptimization()) return; + lilEditorParameters.instance.forceOptimize = false; + lilToonSetting shaderSetting = null; + InitializeShaderSetting(ref shaderSetting); + + lilOptimizer.ResetInputHLSL(); + + if(shaderSetting.isDebugOptimize) + { + ApplyShaderSettingOptimized(); + } + else + { + TurnOnAllShaderSetting(ref shaderSetting); + ApplyShaderSetting(shaderSetting, "[lilToon] PostprocessBuild", shaders, false); + } + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] SetShaderSettingAfterBuild() failed"); + } + } + + internal static void SetupShaderSettingFromMaterial(Material material, ref lilToonSetting shaderSetting) + { + if(material == null || material.shader == null) return; + if(material.shader.name.Contains("Lite") || material.shader.name.Contains("Multi")) return; + if(!lilMaterialUtils.CheckShaderIslilToon(material.shader)) return; + + if(!shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV && material.HasProperty("_MainTex_ScrollRotate") && material.GetVector("_MainTex_ScrollRotate") != lilConstants.defaultScrollRotate) + { + logs.Add("[lilToon] LIL_FEATURE_ANIMATE_MAIN_UV : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV = true; + } + if(!shaderSetting.LIL_FEATURE_SHADOW && material.HasProperty("_UseShadow") && material.GetFloat("_UseShadow") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_SHADOW : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_SHADOW = true; + } + if(!shaderSetting.LIL_FEATURE_RIMSHADE && material.HasProperty("_UseRimShade") && material.GetFloat("_UseRimShade") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_RIMSHADE : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_RIMSHADE = true; + } + if(!shaderSetting.LIL_FEATURE_RECEIVE_SHADOW && material.HasProperty("_UseShadow") && material.GetFloat("_UseShadow") != 0.0f && ( + (material.HasProperty("_ShadowReceive") && material.GetFloat("_ShadowReceive") > 0.0f) || + (material.HasProperty("_Shadow2ndReceive") && material.GetFloat("_Shadow2ndReceive") > 0.0f) || + (material.HasProperty("_Shadow3rdReceive") && material.GetFloat("_Shadow3rdReceive") > 0.0f)) + ) + { + logs.Add("[lilToon] LIL_FEATURE_RECEIVE_SHADOW : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = true; + } + if(!shaderSetting.LIL_FEATURE_DISTANCE_FADE && material.HasProperty("_DistanceFade") && material.GetVector("_DistanceFade").z != lilConstants.defaultDistanceFadeParams.z) + { + logs.Add("[lilToon] LIL_FEATURE_DISTANCE_FADE : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_DISTANCE_FADE = true; + } + if(!shaderSetting.LIL_FEATURE_SHADOW_3RD && material.HasProperty("_Shadow3rdColor") && material.GetColor("_Shadow3rdColor").a != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_SHADOW_3RD : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_SHADOW_3RD = true; + } + if(!shaderSetting.LIL_FEATURE_SHADOW_LUT && material.HasProperty("_ShadowColorType") && material.GetFloat("_ShadowColorType") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_SHADOW_LUT : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_SHADOW_LUT = true; + } + + if(material.shader.name.Contains("Fur")) + { + if(!shaderSetting.LIL_FEATURE_FUR_COLLISION && material.HasProperty("_FurTouchStrength") && material.GetFloat("_FurTouchStrength") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_FUR_COLLISION : " + AssetDatabase.GetAssetPath(material)); + logs.Add("[lilToon] LIL_OPTIMIZE_USE_VERTEXLIGHT : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_FUR_COLLISION = true; + shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = true; + } + } + + if(!shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION && material.HasProperty("_MainTexHSVG") && material.GetVector("_MainTexHSVG") != lilConstants.defaultHSVG) + { + logs.Add("[lilToon] LIL_FEATURE_MAIN_TONE_CORRECTION : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION = true; + } + if(!shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP && material.HasProperty("_MainGradationStrength") && material.GetFloat("_MainGradationStrength") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_MAIN_GRADATION_MAP : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP = true; + } + if(!shaderSetting.LIL_FEATURE_MAIN2ND && material.HasProperty("_UseMain2ndTex") && material.GetFloat("_UseMain2ndTex") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_MAIN2ND : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_MAIN2ND = true; + } + if(!shaderSetting.LIL_FEATURE_MAIN3RD && material.HasProperty("_UseMain3rdTex") && material.GetFloat("_UseMain3rdTex") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_MAIN3RD : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_MAIN3RD = true; + } + if(!shaderSetting.LIL_FEATURE_DECAL && ( + (material.HasProperty("_Main2ndTexIsDecal") && material.GetFloat("_Main2ndTexIsDecal") != 0.0f) || + (material.HasProperty("_Main3rdTexIsDecal") && material.GetFloat("_Main3rdTexIsDecal") != 0.0f)) + ) + { + logs.Add("[lilToon] LIL_FEATURE_DECAL : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_DECAL = true; + } + if(!shaderSetting.LIL_FEATURE_ANIMATE_DECAL && ( + (material.HasProperty("_Main2ndTexDecalAnimation") && material.GetVector("_Main2ndTexDecalAnimation") != lilConstants.defaultDecalAnim) || + (material.HasProperty("_Main3rdTexDecalAnimation") && material.GetVector("_Main3rdTexDecalAnimation") != lilConstants.defaultDecalAnim)) + ) + { + logs.Add("[lilToon] LIL_FEATURE_ANIMATE_DECAL : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_ANIMATE_DECAL = true; + } + if(!shaderSetting.LIL_FEATURE_LAYER_DISSOLVE && ( + (material.HasProperty("_Main2ndDissolveParams") && material.GetVector("_Main2ndDissolveParams").x != lilConstants.defaultDissolveParams.x) || + (material.HasProperty("_Main3rdDissolveParams") && material.GetVector("_Main3rdDissolveParams").x != lilConstants.defaultDissolveParams.x)) + ) + { + logs.Add("[lilToon] LIL_FEATURE_LAYER_DISSOLVE : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_LAYER_DISSOLVE = true; + } + if(!shaderSetting.LIL_FEATURE_ALPHAMASK && material.HasProperty("_AlphaMaskMode") && material.GetFloat("_AlphaMaskMode") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_ALPHAMASK : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_ALPHAMASK = true; + } + if(!shaderSetting.LIL_FEATURE_EMISSION_1ST && material.HasProperty("_UseEmission") && material.GetFloat("_UseEmission") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_EMISSION_1ST : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_EMISSION_1ST = true; + } + if(!shaderSetting.LIL_FEATURE_EMISSION_2ND && material.HasProperty("_UseEmission2nd") && material.GetFloat("_UseEmission2nd") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_EMISSION_2ND : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_EMISSION_2ND = true; + } + if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV && ( + (material.HasProperty("_EmissionMap_ScrollRotate") && material.GetVector("_EmissionMap_ScrollRotate") != lilConstants.defaultScrollRotate) || + (material.HasProperty("_Emission2ndMap_ScrollRotate") && material.GetVector("_Emission2ndMap_ScrollRotate") != lilConstants.defaultScrollRotate)) + ) + { + logs.Add("[lilToon] LIL_FEATURE_ANIMATE_EMISSION_UV : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = true; + } + if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV && ( + (material.HasProperty("_EmissionBlendMask_ScrollRotate") && material.GetVector("_EmissionBlendMask_ScrollRotate") != lilConstants.defaultScrollRotate) || + (material.HasProperty("_Emission2ndBlendMask_ScrollRotate") && material.GetVector("_Emission2ndBlendMask_ScrollRotate") != lilConstants.defaultScrollRotate)) + ) + { + logs.Add("[lilToon] LIL_FEATURE_ANIMATE_EMISSION_MASK_UV : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = true; + } + if(!shaderSetting.LIL_FEATURE_EMISSION_GRADATION && ( + (material.HasProperty("_EmissionUseGrad") && material.GetFloat("_EmissionUseGrad") != 0.0f) || + (material.HasProperty("_Emission2ndUseGrad") && material.GetFloat("_Emission2ndUseGrad") != 0.0f)) + ) + { + logs.Add("[lilToon] LIL_FEATURE_EMISSION_GRADATION : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_EMISSION_GRADATION = true; + } + if(!shaderSetting.LIL_FEATURE_NORMAL_1ST && material.HasProperty("_UseBumpMap") && material.GetFloat("_UseBumpMap") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_NORMAL_1ST : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_NORMAL_1ST = true; + } + if(!shaderSetting.LIL_FEATURE_NORMAL_2ND && material.HasProperty("_UseBump2ndMap") && material.GetFloat("_UseBump2ndMap") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_NORMAL_2ND : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_NORMAL_2ND = true; + } + if(!shaderSetting.LIL_FEATURE_ANISOTROPY && material.HasProperty("_UseAnisotropy") && material.GetFloat("_UseAnisotropy") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_ANISOTROPY : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_ANISOTROPY = true; + } + if(!shaderSetting.LIL_FEATURE_REFLECTION && material.HasProperty("_UseReflection") && material.GetFloat("_UseReflection") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_REFLECTION : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_REFLECTION = true; + } + if(!shaderSetting.LIL_FEATURE_MATCAP && material.HasProperty("_UseMatCap") && material.GetFloat("_UseMatCap") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_MATCAP : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_MATCAP = true; + } + if(!shaderSetting.LIL_FEATURE_MATCAP_2ND && material.HasProperty("_UseMatCap2nd") && material.GetFloat("_UseMatCap2nd") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_MATCAP_2ND : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_MATCAP_2ND = true; + } + if(!shaderSetting.LIL_FEATURE_RIMLIGHT && material.HasProperty("_UseRim") && material.GetFloat("_UseRim") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_RIMLIGHT : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_RIMLIGHT = true; + } + if(!shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION && material.HasProperty("_RimDirStrength") && material.GetFloat("_RimDirStrength") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_RIMLIGHT_DIRECTION : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION = true; + } + if(!shaderSetting.LIL_FEATURE_GLITTER && material.HasProperty("_UseGlitter") && material.GetFloat("_UseGlitter") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_GLITTER : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_GLITTER = true; + } + if(!shaderSetting.LIL_FEATURE_BACKLIGHT && material.HasProperty("_UseBacklight") && material.GetFloat("_UseBacklight") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_BACKLIGHT : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_BACKLIGHT = true; + } + if(!shaderSetting.LIL_FEATURE_PARALLAX && material.HasProperty("_UseParallax") && material.GetFloat("_UseParallax") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_PARALLAX : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_PARALLAX = true; + if(!shaderSetting.LIL_FEATURE_POM && material.HasProperty("_UsePOM") && material.GetFloat("_UsePOM") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_POM : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_POM = true; + } + } + if(!shaderSetting.LIL_FEATURE_AUDIOLINK && material.HasProperty("_UseAudioLink") && material.GetFloat("_UseAudioLink") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_AUDIOLINK : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_AUDIOLINK = true; + } + if(!shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX && material.HasProperty("_AudioLink2Vertex") && material.GetFloat("_AudioLink2Vertex") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_AUDIOLINK_VERTEX : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX = true; + } + if(!shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL && material.HasProperty("_AudioLinkAsLocal") && material.GetFloat("_AudioLinkAsLocal") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_AUDIOLINK_LOCAL : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL = true; + } + if(!shaderSetting.LIL_FEATURE_DISSOLVE && material.HasProperty("_DissolveParams") && material.GetVector("_DissolveParams").x != lilConstants.defaultDissolveParams.x) + { + logs.Add("[lilToon] LIL_FEATURE_DISSOLVE : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_DISSOLVE = true; + } + if(!shaderSetting.LIL_FEATURE_DITHER && material.HasProperty("_UseDither") && material.GetFloat("_UseDither") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_DITHER : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_DITHER = true; + } + if(!shaderSetting.LIL_FEATURE_IDMASK && ( + material.HasProperty("_IDMask1") && material.GetFloat("_IDMask1") != 0.0f || + material.HasProperty("_IDMask2") && material.GetFloat("_IDMask2") != 0.0f || + material.HasProperty("_IDMask3") && material.GetFloat("_IDMask3") != 0.0f || + material.HasProperty("_IDMask4") && material.GetFloat("_IDMask4") != 0.0f || + material.HasProperty("_IDMask5") && material.GetFloat("_IDMask5") != 0.0f || + material.HasProperty("_IDMask6") && material.GetFloat("_IDMask6") != 0.0f || + material.HasProperty("_IDMask7") && material.GetFloat("_IDMask7") != 0.0f || + material.HasProperty("_IDMask8") && material.GetFloat("_IDMask8") != 0.0f || + material.HasProperty("_IDMaskPrior1") && material.GetFloat("_IDMaskPrior1") != 0.0f || + material.HasProperty("_IDMaskPrior2") && material.GetFloat("_IDMaskPrior2") != 0.0f || + material.HasProperty("_IDMaskPrior3") && material.GetFloat("_IDMaskPrior3") != 0.0f || + material.HasProperty("_IDMaskPrior4") && material.GetFloat("_IDMaskPrior4") != 0.0f || + material.HasProperty("_IDMaskPrior5") && material.GetFloat("_IDMaskPrior5") != 0.0f || + material.HasProperty("_IDMaskPrior6") && material.GetFloat("_IDMaskPrior6") != 0.0f || + material.HasProperty("_IDMaskPrior7") && material.GetFloat("_IDMaskPrior7") != 0.0f || + material.HasProperty("_IDMaskPrior8") && material.GetFloat("_IDMaskPrior8") != 0.0f || + material.HasProperty("_IDMaskIsBitmap") && material.GetFloat("_IDMaskIsBitmap") != 0.0f || + material.HasProperty("_IDMaskCompile") && material.GetFloat("_IDMaskCompile") != 0.0f + )) + { + logs.Add("[lilToon] LIL_FEATURE_IDMASK : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_IDMASK = true; + } + + if(!shaderSetting.LIL_FEATURE_UDIMDISCARD && material.HasProperty("_UDIMDiscardCompile") && material.GetFloat("_UDIMDiscardCompile") != 0.0f) { + logs.Add("[lilToon] LIL_FEATURE_UDIMDISCARD : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_UDIMDISCARD = true; + } + + // Outline + if(material.shader.name.Contains("Outline")) + { + if(!shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV && material.HasProperty("_OutlineTex_ScrollRotate") && material.GetVector("_OutlineTex_ScrollRotate") != lilConstants.defaultScrollRotate) + { + logs.Add("[lilToon] LIL_FEATURE_ANIMATE_OUTLINE_UV : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV = true; + } + if(!shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION && material.HasProperty("_OutlineTexHSVG") && material.GetVector("_OutlineTexHSVG") != lilConstants.defaultHSVG) + { + logs.Add("[lilToon] LIL_FEATURE_OUTLINE_TONE_CORRECTION : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION = true; + } + if(!shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW && material.HasProperty("_OutlineLitShadowReceive") && material.GetFloat("_OutlineLitShadowReceive") != 0.0f) + { + logs.Add("[lilToon] LIL_FEATURE_OUTLINE_RECEIVE_SHADOW : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW = true; + } + } + + if(!shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT && material.HasProperty("_VertexLightStrength") && material.GetFloat("_VertexLightStrength") != 0.0f) + { + logs.Add("[lilToon] LIL_OPTIMIZE_USE_VERTEXLIGHT : " + AssetDatabase.GetAssetPath(material)); + shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = true; + } + + // Texture + CheckTextures(ref shaderSetting, material); + } + + private static void SetupShaderSettingFromAnimationClip(AnimationClip clip, ref lilToonSetting shaderSetting, bool shouldCheckMaterial = false) + { + if(clip == null) return; + + if(shouldCheckMaterial) + { + foreach(var frame in AnimationUtility.GetObjectReferenceCurveBindings(clip).SelectMany(b => AnimationUtility.GetObjectReferenceCurve(clip, b)).Where(f => f.value is Material)) + { + SetupShaderSettingFromMaterial((Material)frame.value, ref shaderSetting); + } + } + + foreach(var binding in AnimationUtility.GetCurveBindings(clip)) + { + string propname = binding.propertyName; + if(string.IsNullOrEmpty(propname) || !propname.Contains("material.")) continue; + + shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV = shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV || propname.Contains("_MainTex_ScrollRotate"); + shaderSetting.LIL_FEATURE_SHADOW = shaderSetting.LIL_FEATURE_SHADOW || propname.Contains("_UseShadow"); + shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = shaderSetting.LIL_FEATURE_RECEIVE_SHADOW || propname.Contains("_ShadowReceive") || propname.Contains("_Shadow2ndReceive") || propname.Contains("_Shadow3rdReceive"); + shaderSetting.LIL_FEATURE_DISTANCE_FADE = shaderSetting.LIL_FEATURE_DISTANCE_FADE || propname.Contains("_DistanceFade"); + shaderSetting.LIL_FEATURE_SHADOW_3RD = shaderSetting.LIL_FEATURE_SHADOW_3RD || propname.Contains("_Shadow3rdColor"); + shaderSetting.LIL_FEATURE_SHADOW_LUT = shaderSetting.LIL_FEATURE_SHADOW_LUT || propname.Contains("_ShadowColorType"); + shaderSetting.LIL_FEATURE_RIMSHADE = shaderSetting.LIL_FEATURE_RIMSHADE || propname.Contains("_UseRimShade"); + + shaderSetting.LIL_FEATURE_FUR_COLLISION = shaderSetting.LIL_FEATURE_FUR_COLLISION || propname.Contains("_FurTouchStrength"); + + shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION = shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION || propname.Contains("_MainTexHSVG"); + shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP = shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP || propname.Contains("_MainGradationStrength"); + shaderSetting.LIL_FEATURE_MAIN2ND = shaderSetting.LIL_FEATURE_MAIN2ND || propname.Contains("_UseMain2ndTex"); + shaderSetting.LIL_FEATURE_MAIN3RD = shaderSetting.LIL_FEATURE_MAIN3RD || propname.Contains("_UseMain3rdTex"); + shaderSetting.LIL_FEATURE_DECAL = shaderSetting.LIL_FEATURE_DECAL || propname.Contains("_Main2ndTexIsDecal") || propname.Contains("_Main3rdTexIsDecal"); + shaderSetting.LIL_FEATURE_ANIMATE_DECAL = shaderSetting.LIL_FEATURE_ANIMATE_DECAL || propname.Contains("_Main2ndTexDecalAnimation") || propname.Contains("_Main3rdTexDecalAnimation"); + shaderSetting.LIL_FEATURE_LAYER_DISSOLVE = shaderSetting.LIL_FEATURE_LAYER_DISSOLVE || propname.Contains("_Main2ndDissolveParams") || propname.Contains("_Main3rdDissolveParams"); + shaderSetting.LIL_FEATURE_ALPHAMASK = shaderSetting.LIL_FEATURE_ALPHAMASK || propname.Contains("_AlphaMaskMode"); + shaderSetting.LIL_FEATURE_EMISSION_1ST = shaderSetting.LIL_FEATURE_EMISSION_1ST || propname.Contains("_UseEmission"); + shaderSetting.LIL_FEATURE_EMISSION_2ND = shaderSetting.LIL_FEATURE_EMISSION_2ND || propname.Contains("_UseEmission2nd"); + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV || propname.Contains("_EmissionMap_ScrollRotate") || propname.Contains("_Emission2ndMap_ScrollRotate"); + shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV || propname.Contains("_EmissionBlendMask_ScrollRotate") || propname.Contains("_Emission2ndBlendMask_ScrollRotate"); + shaderSetting.LIL_FEATURE_EMISSION_GRADATION = shaderSetting.LIL_FEATURE_EMISSION_GRADATION || propname.Contains("_EmissionUseGrad"); + shaderSetting.LIL_FEATURE_NORMAL_1ST = shaderSetting.LIL_FEATURE_NORMAL_1ST || propname.Contains("_UseBumpMap"); + shaderSetting.LIL_FEATURE_NORMAL_2ND = shaderSetting.LIL_FEATURE_NORMAL_2ND || propname.Contains("_UseBump2ndMap"); + shaderSetting.LIL_FEATURE_ANISOTROPY = shaderSetting.LIL_FEATURE_ANISOTROPY || propname.Contains("_UseAnisotropy"); + shaderSetting.LIL_FEATURE_REFLECTION = shaderSetting.LIL_FEATURE_REFLECTION || propname.Contains("_UseReflection"); + shaderSetting.LIL_FEATURE_MATCAP = shaderSetting.LIL_FEATURE_MATCAP || propname.Contains("_UseMatCap"); + shaderSetting.LIL_FEATURE_MATCAP_2ND = shaderSetting.LIL_FEATURE_MATCAP_2ND || propname.Contains("_UseMatCap2nd"); + shaderSetting.LIL_FEATURE_RIMLIGHT = shaderSetting.LIL_FEATURE_RIMLIGHT || propname.Contains("_UseRim"); + shaderSetting.LIL_FEATURE_GLITTER = shaderSetting.LIL_FEATURE_GLITTER || propname.Contains("_UseGlitter"); + shaderSetting.LIL_FEATURE_BACKLIGHT = shaderSetting.LIL_FEATURE_BACKLIGHT || propname.Contains("_UseBacklight"); + shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION = shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION || propname.Contains("_RimDirStrength"); + shaderSetting.LIL_FEATURE_PARALLAX = shaderSetting.LIL_FEATURE_PARALLAX || propname.Contains("_UseParallax"); + shaderSetting.LIL_FEATURE_POM = shaderSetting.LIL_FEATURE_POM || propname.Contains("_UsePOM"); + shaderSetting.LIL_FEATURE_AUDIOLINK = shaderSetting.LIL_FEATURE_AUDIOLINK || propname.Contains("_UseAudioLink"); + shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX = shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX || propname.Contains("_AudioLink2Vertex"); + shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL = shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL || propname.Contains("_AudioLinkAsLocal"); + shaderSetting.LIL_FEATURE_DISSOLVE = shaderSetting.LIL_FEATURE_DISSOLVE || propname.Contains("_DissolveParams"); + shaderSetting.LIL_FEATURE_DITHER = shaderSetting.LIL_FEATURE_DITHER || propname.Contains("_UseDither"); + + if(!shaderSetting.LIL_FEATURE_IDMASK && ( + propname.Contains("_IDMask1") || propname.Contains("_IDMaskIndex1") || propname.Contains("_IDMaskPrior1") || + propname.Contains("_IDMask2") || propname.Contains("_IDMaskIndex2") || propname.Contains("_IDMaskPrior2") || + propname.Contains("_IDMask3") || propname.Contains("_IDMaskIndex3") || propname.Contains("_IDMaskPrior3") || + propname.Contains("_IDMask4") || propname.Contains("_IDMaskIndex4") || propname.Contains("_IDMaskPrior4") || + propname.Contains("_IDMask5") || propname.Contains("_IDMaskIndex5") || propname.Contains("_IDMaskPrior5") || + propname.Contains("_IDMask6") || propname.Contains("_IDMaskIndex6") || propname.Contains("_IDMaskPrior6") || + propname.Contains("_IDMask7") || propname.Contains("_IDMaskIndex7") || propname.Contains("_IDMaskPrior7") || + propname.Contains("_IDMask8") || propname.Contains("_IDMaskIndex8") || propname.Contains("_IDMaskPrior8") + )) + { + shaderSetting.LIL_FEATURE_IDMASK = true; + } + + shaderSetting.LIL_FEATURE_UDIMDISCARD = shaderSetting.LIL_FEATURE_UDIMDISCARD || propname.Contains("_UDIMDiscardCompile"); + + shaderSetting.LIL_FEATURE_ENCRYPTION = shaderSetting.LIL_FEATURE_ENCRYPTION || propname.Contains("_BitKey0"); + + shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV = shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV || propname.Contains("_OutlineTex_ScrollRotate"); + shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION = shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION || propname.Contains("_OutlineTexHSVG"); + shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW = shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW || propname.Contains("_OutlineLitShadowReceive"); + + shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT || shaderSetting.LIL_FEATURE_FUR_COLLISION || propname.Contains("_VertexLightStrength"); + + // Texture + CheckTextures(ref shaderSetting, propname); + } + } + + internal static void CheckTextures(ref lilToonSetting shaderSetting) + { + // Get materials + foreach(var material in lilDirectoryManager.FindAssets("t:material")) + { + CheckTextures(ref shaderSetting, material); + } + + // Get animations + foreach(var propname in lilDirectoryManager.FindAssets("t:animationclip").SelectMany(c => AnimationUtility.GetCurveBindings(c)).Select(b => b.propertyName).Where(n => !string.IsNullOrEmpty(n) && n.Contains("material."))) + { + CheckTextures(ref shaderSetting, propname); + } + } + + internal static void CheckTextures(ref lilToonSetting shaderSetting, Material material) + { + CheckTexture(ref shaderSetting.LIL_FEATURE_MainGradationTex , "_MainGradationTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MainColorAdjustMask , "_MainColorAdjustMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main2ndTex , "_Main2ndTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main2ndBlendMask , "_Main2ndBlendMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main2ndDissolveMask , "_Main2ndDissolveMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main2ndDissolveNoiseMask , "_Main2ndDissolveNoiseMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main3rdTex , "_Main3rdTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main3rdBlendMask , "_Main3rdBlendMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main3rdDissolveMask , "_Main3rdDissolveMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Main3rdDissolveNoiseMask , "_Main3rdDissolveNoiseMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_AlphaMask , "_AlphaMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_BumpMap , "_BumpMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Bump2ndMap , "_Bump2ndMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Bump2ndScaleMask , "_Bump2ndScaleMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_AnisotropyTangentMap , "_AnisotropyTangentMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_AnisotropyScaleMask , "_AnisotropyScaleMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_AnisotropyShiftNoiseMask , "_AnisotropyShiftNoiseMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_ShadowBorderMask , "_ShadowBorderMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_ShadowBlurMask , "_ShadowBlurMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_ShadowStrengthMask , "_ShadowStrengthMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_ShadowColorTex , "_ShadowColorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Shadow2ndColorTex , "_Shadow2ndColorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Shadow3rdColorTex , "_Shadow3rdColorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_RimShadeMask , "_RimShadeMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_BacklightColorTex , "_BacklightColorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_SmoothnessTex , "_SmoothnessTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MetallicGlossMap , "_MetallicGlossMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_ReflectionColorTex , "_ReflectionColorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_ReflectionCubeTex , "_ReflectionCubeTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MatCapTex , "_MatCapTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MatCapBlendMask , "_MatCapBlendMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MatCapBumpMap , "_MatCapBumpMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MatCap2ndTex , "_MatCap2ndTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MatCap2ndBlendMask , "_MatCap2ndBlendMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_MatCap2ndBumpMap , "_MatCap2ndBumpMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_RimColorTex , "_RimColorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_GlitterColorTex , "_GlitterColorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_GlitterShapeTex , "_GlitterShapeTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_EmissionMap , "_EmissionMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_EmissionBlendMask , "_EmissionBlendMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_EmissionGradTex , "_EmissionGradTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Emission2ndMap , "_Emission2ndMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Emission2ndBlendMask , "_Emission2ndBlendMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_Emission2ndGradTex , "_Emission2ndGradTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_ParallaxMap , "_ParallaxMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_AudioLinkMask , "_AudioLinkMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_AudioLinkLocalMap , "_AudioLinkLocalMap", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_DissolveMask , "_DissolveMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_DissolveNoiseMask , "_DissolveNoiseMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_OutlineTex , "_OutlineTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_OutlineWidthMask , "_OutlineWidthMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_OutlineVectorTex , "_OutlineVectorTex", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_FurNoiseMask , "_FurNoiseMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_FurMask , "_FurMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_FurLengthMask , "_FurLengthMask", material); + CheckTexture(ref shaderSetting.LIL_FEATURE_FurVectorTex , "_FurVectorTex", material); + } + + internal static void CheckTextures(ref lilToonSetting shaderSetting, string propname) + { + shaderSetting.LIL_FEATURE_MainGradationTex = shaderSetting.LIL_FEATURE_MainGradationTex || propname.Contains("_MainGradationTex"); + shaderSetting.LIL_FEATURE_MainColorAdjustMask = shaderSetting.LIL_FEATURE_MainColorAdjustMask || propname.Contains("_MainColorAdjustMask"); + shaderSetting.LIL_FEATURE_Main2ndTex = shaderSetting.LIL_FEATURE_Main2ndTex || propname.Contains("_Main2ndTex"); + shaderSetting.LIL_FEATURE_Main2ndBlendMask = shaderSetting.LIL_FEATURE_Main2ndBlendMask || propname.Contains("_Main2ndBlendMask"); + shaderSetting.LIL_FEATURE_Main2ndDissolveMask = shaderSetting.LIL_FEATURE_Main2ndDissolveMask || propname.Contains("_Main2ndDissolveMask"); + shaderSetting.LIL_FEATURE_Main2ndDissolveNoiseMask = shaderSetting.LIL_FEATURE_Main2ndDissolveNoiseMask || propname.Contains("_Main2ndDissolveNoiseMask"); + shaderSetting.LIL_FEATURE_Main3rdTex = shaderSetting.LIL_FEATURE_Main3rdTex || propname.Contains("_Main3rdTex"); + shaderSetting.LIL_FEATURE_Main3rdBlendMask = shaderSetting.LIL_FEATURE_Main3rdBlendMask || propname.Contains("_Main3rdBlendMask"); + shaderSetting.LIL_FEATURE_Main3rdDissolveMask = shaderSetting.LIL_FEATURE_Main3rdDissolveMask || propname.Contains("_Main3rdDissolveMask"); + shaderSetting.LIL_FEATURE_Main3rdDissolveNoiseMask = shaderSetting.LIL_FEATURE_Main3rdDissolveNoiseMask || propname.Contains("_Main3rdDissolveNoiseMask"); + shaderSetting.LIL_FEATURE_AlphaMask = shaderSetting.LIL_FEATURE_AlphaMask || propname.Contains("_AlphaMask"); + shaderSetting.LIL_FEATURE_BumpMap = shaderSetting.LIL_FEATURE_BumpMap || propname.Contains("_BumpMap"); + shaderSetting.LIL_FEATURE_Bump2ndMap = shaderSetting.LIL_FEATURE_Bump2ndMap || propname.Contains("_Bump2ndMap"); + shaderSetting.LIL_FEATURE_Bump2ndScaleMask = shaderSetting.LIL_FEATURE_Bump2ndScaleMask || propname.Contains("_Bump2ndScaleMask"); + shaderSetting.LIL_FEATURE_AnisotropyTangentMap = shaderSetting.LIL_FEATURE_AnisotropyTangentMap || propname.Contains("_AnisotropyTangentMap"); + shaderSetting.LIL_FEATURE_AnisotropyScaleMask = shaderSetting.LIL_FEATURE_AnisotropyScaleMask || propname.Contains("_AnisotropyScaleMask"); + shaderSetting.LIL_FEATURE_AnisotropyShiftNoiseMask = shaderSetting.LIL_FEATURE_AnisotropyShiftNoiseMask || propname.Contains("_AnisotropyShiftNoiseMask"); + shaderSetting.LIL_FEATURE_ShadowBorderMask = shaderSetting.LIL_FEATURE_ShadowBorderMask || propname.Contains("_ShadowBorderMask"); + shaderSetting.LIL_FEATURE_ShadowBlurMask = shaderSetting.LIL_FEATURE_ShadowBlurMask || propname.Contains("_ShadowBlurMask"); + shaderSetting.LIL_FEATURE_ShadowStrengthMask = shaderSetting.LIL_FEATURE_ShadowStrengthMask || propname.Contains("_ShadowStrengthMask"); + shaderSetting.LIL_FEATURE_ShadowColorTex = shaderSetting.LIL_FEATURE_ShadowColorTex || propname.Contains("_ShadowColorTex"); + shaderSetting.LIL_FEATURE_Shadow2ndColorTex = shaderSetting.LIL_FEATURE_Shadow2ndColorTex || propname.Contains("_Shadow2ndColorTex"); + shaderSetting.LIL_FEATURE_Shadow3rdColorTex = shaderSetting.LIL_FEATURE_Shadow3rdColorTex || propname.Contains("_Shadow3rdColorTex"); + shaderSetting.LIL_FEATURE_RimShadeMask = shaderSetting.LIL_FEATURE_RimShadeMask || propname.Contains("_RimShadeMask"); + shaderSetting.LIL_FEATURE_BacklightColorTex = shaderSetting.LIL_FEATURE_BacklightColorTex || propname.Contains("_BacklightColorTex"); + shaderSetting.LIL_FEATURE_SmoothnessTex = shaderSetting.LIL_FEATURE_SmoothnessTex || propname.Contains("_SmoothnessTex"); + shaderSetting.LIL_FEATURE_MetallicGlossMap = shaderSetting.LIL_FEATURE_MetallicGlossMap || propname.Contains("_MetallicGlossMap"); + shaderSetting.LIL_FEATURE_ReflectionColorTex = shaderSetting.LIL_FEATURE_ReflectionColorTex || propname.Contains("_ReflectionColorTex"); + shaderSetting.LIL_FEATURE_ReflectionCubeTex = shaderSetting.LIL_FEATURE_ReflectionCubeTex || propname.Contains("_ReflectionCubeTex"); + shaderSetting.LIL_FEATURE_MatCapTex = shaderSetting.LIL_FEATURE_MatCapTex || propname.Contains("_MatCapTex"); + shaderSetting.LIL_FEATURE_MatCapBlendMask = shaderSetting.LIL_FEATURE_MatCapBlendMask || propname.Contains("_MatCapBlendMask"); + shaderSetting.LIL_FEATURE_MatCapBumpMap = shaderSetting.LIL_FEATURE_MatCapBumpMap || propname.Contains("_MatCapBumpMap"); + shaderSetting.LIL_FEATURE_MatCap2ndTex = shaderSetting.LIL_FEATURE_MatCap2ndTex || propname.Contains("_MatCap2ndTex"); + shaderSetting.LIL_FEATURE_MatCap2ndBlendMask = shaderSetting.LIL_FEATURE_MatCap2ndBlendMask || propname.Contains("_MatCap2ndBlendMask"); + shaderSetting.LIL_FEATURE_MatCap2ndBumpMap = shaderSetting.LIL_FEATURE_MatCap2ndBumpMap || propname.Contains("_MatCap2ndBumpMap"); + shaderSetting.LIL_FEATURE_RimColorTex = shaderSetting.LIL_FEATURE_RimColorTex || propname.Contains("_RimColorTex"); + shaderSetting.LIL_FEATURE_GlitterColorTex = shaderSetting.LIL_FEATURE_GlitterColorTex || propname.Contains("_GlitterColorTex"); + shaderSetting.LIL_FEATURE_GlitterShapeTex = shaderSetting.LIL_FEATURE_GlitterShapeTex || propname.Contains("_GlitterShapeTex"); + shaderSetting.LIL_FEATURE_EmissionMap = shaderSetting.LIL_FEATURE_EmissionMap || propname.Contains("_EmissionMap"); + shaderSetting.LIL_FEATURE_EmissionBlendMask = shaderSetting.LIL_FEATURE_EmissionBlendMask || propname.Contains("_EmissionBlendMask"); + shaderSetting.LIL_FEATURE_EmissionGradTex = shaderSetting.LIL_FEATURE_EmissionGradTex || propname.Contains("_EmissionGradTex"); + shaderSetting.LIL_FEATURE_Emission2ndMap = shaderSetting.LIL_FEATURE_Emission2ndMap || propname.Contains("_Emission2ndMap"); + shaderSetting.LIL_FEATURE_Emission2ndBlendMask = shaderSetting.LIL_FEATURE_Emission2ndBlendMask || propname.Contains("_Emission2ndBlendMask"); + shaderSetting.LIL_FEATURE_Emission2ndGradTex = shaderSetting.LIL_FEATURE_Emission2ndGradTex || propname.Contains("_Emission2ndGradTex"); + shaderSetting.LIL_FEATURE_ParallaxMap = shaderSetting.LIL_FEATURE_ParallaxMap || propname.Contains("_ParallaxMap"); + shaderSetting.LIL_FEATURE_AudioLinkMask = shaderSetting.LIL_FEATURE_AudioLinkMask || propname.Contains("_AudioLinkMask"); + shaderSetting.LIL_FEATURE_AudioLinkLocalMap = shaderSetting.LIL_FEATURE_AudioLinkLocalMap || propname.Contains("_AudioLinkLocalMap"); + shaderSetting.LIL_FEATURE_DissolveMask = shaderSetting.LIL_FEATURE_DissolveMask || propname.Contains("_DissolveMask"); + shaderSetting.LIL_FEATURE_DissolveNoiseMask = shaderSetting.LIL_FEATURE_DissolveNoiseMask || propname.Contains("_DissolveNoiseMask"); + shaderSetting.LIL_FEATURE_OutlineTex = shaderSetting.LIL_FEATURE_OutlineTex || propname.Contains("_OutlineTex"); + shaderSetting.LIL_FEATURE_OutlineWidthMask = shaderSetting.LIL_FEATURE_OutlineWidthMask || propname.Contains("_OutlineWidthMask"); + shaderSetting.LIL_FEATURE_OutlineVectorTex = shaderSetting.LIL_FEATURE_OutlineVectorTex || propname.Contains("_OutlineVectorTex"); + shaderSetting.LIL_FEATURE_FurNoiseMask = shaderSetting.LIL_FEATURE_FurNoiseMask || propname.Contains("_FurNoiseMask"); + shaderSetting.LIL_FEATURE_FurMask = shaderSetting.LIL_FEATURE_FurMask || propname.Contains("_FurMask"); + shaderSetting.LIL_FEATURE_FurLengthMask = shaderSetting.LIL_FEATURE_FurLengthMask || propname.Contains("_FurLengthMask"); + shaderSetting.LIL_FEATURE_FurVectorTex = shaderSetting.LIL_FEATURE_FurVectorTex || propname.Contains("_FurVectorTex"); + } + + private static void CheckTexture(ref bool LIL_FEATURE_Tex, string propname, Material material) + { + if(LIL_FEATURE_Tex || !material.HasProperty(propname) || material.GetTexture(propname) == null) return; + logs.Add("[lilToon] " + propname + " : " + AssetDatabase.GetAssetPath(material)); + LIL_FEATURE_Tex = true; + } + + internal static bool ShouldOptimization() + { + if(!string.IsNullOrEmpty(lilEditorParameters.instance.modifiedShaders)) return false; + if(lilEditorParameters.instance.forceOptimize) return true; + + lilToonSetting shaderSetting = null; + InitializeShaderSetting(ref shaderSetting); + #if LILTOON_VRCSDK3_AVATARS + return shaderSetting.isOptimizeInTestBuild && !shaderSetting.isDebugOptimize; + #else + return !shaderSetting.isDebugOptimize; + #endif + } + + private static List GetShaderListFromProject() + { + return GetTrueShaderLists(lilDirectoryManager.FindAssets("t:material").Where(m => lilMaterialUtils.CheckShaderIslilToon(m)).Select(m => m.shader).Distinct().ToList()); + } + + private static List GetShaderListFromGameObject(Material[] materials, AnimationClip[] clips) + { + var shaders = materials.Where(m => lilMaterialUtils.CheckShaderIslilToon(m)).Select(m => m.shader).ToList(); + + foreach(var clip in clips) + { + CheckAnimationClip(clip, shaders); + } + + return GetTrueShaderLists(shaders); + } + + private static List GetTrueShaderLists(List shaders) + { + shaders = shaders.Distinct().ToList(); + foreach(var path in shaders.Select(s => AssetDatabase.GetAssetPath(s)).Where(p => !string.IsNullOrEmpty(p)).ToArray()) + { + TextReader sr; + if(path.Contains(".lilcontainer")) + { + sr = new StringReader(lilShaderContainer.UnpackContainer(path)); + } + else + { + sr = new StreamReader(path); + } + string line; + bool isComment = false; + while((line = sr.ReadLine()) != null) + { + isComment = line.Contains("/*"); + if(isComment) + { + if(!line.Contains("*/")) continue; + isComment = false; + line = line.Substring(line.IndexOf("*/") + 2); + } + line = line.Trim(); + if(!line.StartsWith("UsePass")) continue; + int first = line.IndexOf('"') + 1; + int second = line.IndexOf('"', first); + if(line.Substring(0, first).Contains("//")) continue; + string shaderName = line.Substring(first, second - first); + int passNameSep = shaderName.LastIndexOf('/'); + shaderName = shaderName.Substring(0, passNameSep); + var usePassShader = Shader.Find(shaderName); + if(usePassShader != null) shaders.Add(usePassShader); + } + sr.Close(); + } + return shaders.Distinct().ToList(); + } + + private static void CheckAnimationClip(AnimationClip clip, List shaders) + { + shaders.AddRange(AnimationUtility.GetObjectReferenceCurveBindings(clip).SelectMany(b => AnimationUtility.GetObjectReferenceCurve(clip, b)).Where(f => lilMaterialUtils.CheckShaderIslilToon(f.value as Material)).Select(f => ((Material)f.value).shader)); + } +} +#endif diff --git a/Assets/External/lilToon/Editor/lilToonSetting.cs.meta b/Assets/External/lilToon/Editor/lilToonSetting.cs.meta new file mode 100644 index 00000000..f735cf55 --- /dev/null +++ b/Assets/External/lilToon/Editor/lilToonSetting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 99d3fc7e373356646b25831556309409 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/External.meta b/Assets/External/lilToon/External.meta new file mode 100644 index 00000000..787e0fed --- /dev/null +++ b/Assets/External/lilToon/External.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5a718c954aaf3a44d8f38d2a12d3a6de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/External/Editor.meta b/Assets/External/lilToon/External/Editor.meta new file mode 100644 index 00000000..285ebabb --- /dev/null +++ b/Assets/External/lilToon/External/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 36af1e6408b1510489b9090857544762 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/External/Editor/ChilloutVRModule.cs b/Assets/External/lilToon/External/Editor/ChilloutVRModule.cs new file mode 100644 index 00000000..8f59e0e2 --- /dev/null +++ b/Assets/External/lilToon/External/Editor/ChilloutVRModule.cs @@ -0,0 +1,174 @@ +#if UNITY_EDITOR && CVR_CCK_EXISTS +using UnityEditor; +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEngine.Events; +using System.Linq; + +namespace lilToon.External +{ + //------------------------------------------------------------------------------------------------------------------------------ + // ChilloutVR + public static class ChilloutVRModule + { + [InitializeOnLoadMethod] + public static void StartupMethod() + { + try + { + var type = Assembly.Load("Assembly-CSharp-Editor").GetType("ABI.CCK.Scripts.Editor.CCK_BuildUtility"); + var preAvatarBundleEvent = type.GetField("PreAvatarBundleEvent", BindingFlags.Static | BindingFlags.Public); + var prePropBundleEvent = type.GetField("PrePropBundleEvent", BindingFlags.Static | BindingFlags.Public); + var method = typeof(UnityEvent).GetMethod("AddListener"); + var methodOnBuild = typeof(ChilloutVRModule).GetMethod("OnBuildRequested", BindingFlags.Static | BindingFlags.Public); + var m = (UnityAction)Delegate.CreateDelegate(typeof(UnityAction), null, methodOnBuild); + method.Invoke(preAvatarBundleEvent.GetValue(null), new object[]{m}); + method.Invoke(prePropBundleEvent.GetValue(null), new object[]{m}); + } + catch(Exception e) + { + Debug.LogException(e); + } + } + + public static void OnBuildRequested(GameObject avatarGameObject) + { + try + { + var materials = GetMaterialsFromGameObject(avatarGameObject); + var clips = GetAnimationClipsFromGameObject(avatarGameObject); + SetShaderSettingBeforeBuild(materials, clips); + lilMaterialUtils.SetupMultiMaterial(materials, clips); + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] OnBuildRequested() failed"); + } + + EditorApplication.delayCall -= SetShaderSettingAfterBuild; + EditorApplication.delayCall += SetShaderSettingAfterBuild; + } + + private static Material[] GetMaterialsFromGameObject(GameObject gameObject) + { + var materials = new List(); + foreach(var renderer in gameObject.GetComponentsInChildren(true)) + { + materials.AddRange(renderer.sharedMaterials.Where(m => m)); + } + return materials.ToArray(); + } + + private static AnimationClip[] GetAnimationClipsFromGameObject(GameObject gameObject) + { + var clips = new List(); + + foreach(var animator in gameObject.GetComponentsInChildren(true)) + { + if(animator.runtimeAnimatorController) clips.AddRange(animator.runtimeAnimatorController.animationClips); + } + + try + { + var type = Assembly.Load("Assembly-CSharp").GetType("ABI.CCK.Components.CVRAvatar"); + var overridesField = type.GetField("overrides"); + foreach(var descriptor in gameObject.GetComponentsInChildren(type,true)) + { + var overrides = (AnimatorOverrideController)overridesField.GetValue(descriptor); + if(overrides) + { + clips.AddRange(overrides.animationClips.Where(clip => clip)); + } + } + } + catch(Exception e) + { + Debug.LogException(e); + } + + return clips.ToArray(); + } + + private static void SetShaderSettingBeforeBuild(Material[] materials, AnimationClip[] clips) + { + Type type = typeof(lilToonSetting); + var methods = type.GetMethods(BindingFlags.Static | BindingFlags.NonPublic); + foreach(var method in methods) + { + var methodParams = method.GetParameters(); + if(method.Name != "SetShaderSettingBeforeBuild" || methodParams.Length != 2 || methodParams[0].ParameterType != typeof(Material[])) continue; + method.Invoke(null, new object[]{materials,clips}); + break; + } + } + + private static void SetShaderSettingAfterBuild() + { + Type type = typeof(lilToonSetting); + var methods = type.GetMethods(BindingFlags.Static | BindingFlags.NonPublic); + foreach(var method in methods) + { + var methodParams = method.GetParameters(); + if(method.Name != "SetShaderSettingAfterBuild" || methodParams.Length != 0) continue; + method.Invoke(null, null); + break; + } + } + + [MenuItem("GameObject/lilToon/[Debug] Generate bug report (CVR Avatar)", false, 23)] + public static void GenerateBugReportCVRAvatar() + { + var clips = new List(); + try + { + var type = Assembly.Load("Assembly-CSharp").GetType("ABI.CCK.Components.CVRAvatar"); + var overridesField = type.GetField("overrides"); + foreach(var descriptor in Selection.activeGameObject.GetComponentsInChildren(type,true)) + { + var overrides = (AnimatorOverrideController)overridesField.GetValue(descriptor); + if(overrides) + { + clips.AddRange(overrides.animationClips); + } + } + } + catch(Exception e) + { + Debug.LogException(e); + } + + var methods = typeof(lilToonEditorUtils).GetMethods(BindingFlags.Static | BindingFlags.NonPublic); + foreach(var method in methods) + { + var methodParams = method.GetParameters(); + if(method.Name != "GenerateBugReport" || methodParams.Length != 3) continue; + method.Invoke(null, new object[]{null, clips, "# CVR Avatar Debug"}); + return; + } + #pragma warning disable 0162 + if(lilConstants.currentVersionValue < 31) EditorUtility.DisplayDialog("[Debug] Generate bug report (CVR Avatar)","This version does not support bug reports. Prease import lilToon 1.3.5 or newer.","OK"); + else EditorUtility.DisplayDialog("[Debug] Generate bug report (CVR Avatar)","Failed to generate bug report.","OK"); + #pragma warning restore 0162 + } + + [MenuItem("GameObject/lilToon/[Debug] Generate bug report (CVR Avatar)", true, 23)] + public static bool CheckGenerateBugReportCVRAvatar() + { + if(Selection.activeGameObject == null) return false; + try + { + var type = Assembly.Load("Assembly-CSharp").GetType("ABI.CCK.Components.CVRAvatar"); + return Selection.activeGameObject.GetComponent(type); + } + catch(Exception e) + { + Debug.LogException(e); + } + return false; + } + } +} +#endif diff --git a/Assets/External/lilToon/External/Editor/ChilloutVRModule.cs.meta b/Assets/External/lilToon/External/Editor/ChilloutVRModule.cs.meta new file mode 100644 index 00000000..5d37bb6f --- /dev/null +++ b/Assets/External/lilToon/External/Editor/ChilloutVRModule.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eb9a5de8acbfdac438a1069c8c834dae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/External/Editor/VRChatModule.cs b/Assets/External/lilToon/External/Editor/VRChatModule.cs new file mode 100644 index 00000000..e8317cb9 --- /dev/null +++ b/Assets/External/lilToon/External/Editor/VRChatModule.cs @@ -0,0 +1,190 @@ +#if !LILTOON_VRCSDK3_AVATARS && !LILTOON_VRCSDK3_WORLDS && VRC_SDK_VRCSDK3 + #if UDON + #define LILTOON_VRCSDK3_WORLDS + #else + #define LILTOON_VRCSDK3_AVATARS + #endif +#endif +#if UNITY_EDITOR && (LILTOON_VRCSDK3_AVATARS || LILTOON_VRCSDK3_WORLDS || VRC_SDK_VRCSDK2) +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using VRC.SDKBase.Editor.BuildPipeline; + +namespace lilToon.External +{ + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + public class VRChatModule : IVRCSDKBuildRequestedCallback, IVRCSDKPreprocessAvatarCallback, IVRCSDKPostprocessAvatarCallback + { + public int callbackOrder { get { return 100; } } + + public bool OnBuildRequested(VRCSDKRequestedBuildType requestedBuildType) + { + try + { + if(requestedBuildType == VRCSDKRequestedBuildType.Avatar) + { + lilEditorParameters.instance.forceOptimize = true; + } + else + { + lilToonSetting.SetShaderSettingBeforeBuild(false); + EditorApplication.delayCall -= lilToonSetting.SetShaderSettingAfterBuild; + EditorApplication.delayCall += lilToonSetting.SetShaderSettingAfterBuild; + } + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] OnBuildRequested() failed"); + } + return true; + } + + public bool OnPreprocessAvatar(GameObject avatarGameObject) + { + try + { + lilToonSetting shaderSetting = null; + lilToonSetting.InitializeShaderSetting(ref shaderSetting); + var caller = new System.Diagnostics.StackFrame(2, false); + var callerMethod = caller.GetMethod(); + if(!shaderSetting.isOptimizeInNDMF && callerMethod.DeclaringType.FullName == "nadena.dev.ndmf.ApplyOnPlay") return true; + + var materials = GetMaterialsFromGameObject(avatarGameObject); + var clips = GetAnimationClipsFromGameObject(avatarGameObject); + lilToonSetting.SetShaderSettingBeforeBuild(materials, clips); + lilMaterialUtils.SetupMultiMaterial(materials, clips); + } + catch(Exception e) + { + Debug.LogException(e); + Debug.Log("[lilToon] OnPreprocessAvatar() failed"); + } + return true; + } + + public void OnPostprocessAvatar() + { + lilToonSetting.SetShaderSettingAfterBuild(); + } + + private static Material[] GetMaterialsFromGameObject(GameObject gameObject) + { + var materials = new List(); + foreach(var renderer in gameObject.GetComponentsInChildren(true)) + { + materials.AddRange(renderer.sharedMaterials); + } + // sharedMaterials may a Material[null] on Unity 2022.3.22f1 if there is no material on a renderer. + return materials.Where(m => m != null).ToArray(); + } + + private static AnimationClip[] GetAnimationClipsFromGameObject(GameObject gameObject) + { + var clips = new List(); + + foreach(var animator in gameObject.GetComponentsInChildren(true)) + { + if(animator.runtimeAnimatorController != null) clips.AddRange(animator.runtimeAnimatorController.animationClips); + } + + #if LILTOON_VRCSDK3_AVATARS + foreach(var descriptor in gameObject.GetComponentsInChildren(true)) + { + foreach(var layer in descriptor.specialAnimationLayers) + { + if(layer.animatorController != null) clips.AddRange(layer.animatorController.animationClips); + } + if(descriptor.customizeAnimationLayers) + { + foreach(var layer in descriptor.baseAnimationLayers) + { + if(layer.animatorController != null) clips.AddRange(layer.animatorController.animationClips); + } + } + } + #elif VRC_SDK_VRCSDK2 + foreach(var descriptor in gameObject.GetComponentsInChildren(true)) + { + if(descriptor.CustomSittingAnims != null) + { + var overridesSitting = new List>(descriptor.CustomSittingAnims.overridesCount); + descriptor.CustomSittingAnims.GetOverrides(overridesSitting); + clips.AddRange(overridesSitting.Select(p => p.Key)); + clips.AddRange(overridesSitting.Select(p => p.Value)); + } + if(descriptor.CustomStandingAnims != null) + { + var overridesStanding = new List>(descriptor.CustomStandingAnims.overridesCount); + descriptor.CustomStandingAnims.GetOverrides(overridesStanding); + clips.AddRange(overridesStanding.Select(p => p.Key)); + clips.AddRange(overridesStanding.Select(p => p.Value)); + } + } + #endif + + return clips.ToArray(); + } + + // Debug + #if LILTOON_VRCSDK3_AVATARS || VRC_SDK_VRCSDK2 + [MenuItem("GameObject/lilToon/[Debug] Generate bug report (VRChat Avatar)", false, 23)] + public static void GenerateBugReportVRChatAvatar() + { + var clips = new List(); + #if LILTOON_VRCSDK3_AVATARS + foreach(var descriptor in Selection.activeGameObject.GetComponentsInChildren(true)) + { + foreach(var layer in descriptor.specialAnimationLayers) + { + if(layer.animatorController != null) clips.AddRange(layer.animatorController.animationClips); + } + if(descriptor.customizeAnimationLayers) + { + foreach(var layer in descriptor.baseAnimationLayers) + { + if(layer.animatorController != null) clips.AddRange(layer.animatorController.animationClips); + } + } + } + #elif VRC_SDK_VRCSDK2 + foreach(var descriptor in Selection.activeGameObject.GetComponentsInChildren(true)) + { + if(descriptor.CustomSittingAnims != null) + { + var overridesSitting = new List>(descriptor.CustomSittingAnims.overridesCount); + descriptor.CustomSittingAnims.GetOverrides(overridesSitting); + clips.AddRange(overridesSitting.Select(p => p.Key)); + clips.AddRange(overridesSitting.Select(p => p.Value)); + } + if(descriptor.CustomStandingAnims != null) + { + var overridesStanding = new List>(descriptor.CustomStandingAnims.overridesCount); + descriptor.CustomStandingAnims.GetOverrides(overridesStanding); + clips.AddRange(overridesStanding.Select(p => p.Key)); + clips.AddRange(overridesStanding.Select(p => p.Value)); + } + } + #endif + + lilToonEditorUtils.GenerateBugReport(null, clips, "# VRChat Avatar Debug"); + EditorUtility.DisplayDialog("[Debug] Generate bug report (VRChat Avatar)","Failed to generate bug report.","OK"); + } + + [MenuItem("GameObject/lilToon/[Debug] Generate bug report (VRChat Avatar)", true, 23)] + public static bool CheckGenerateBugReportVRChatAvatar() + { + #if LILTOON_VRCSDK3_AVATARS + return Selection.activeGameObject != null && Selection.activeGameObject.GetComponent() != null; + #elif VRC_SDK_VRCSDK2 + return Selection.activeGameObject != null && Selection.activeGameObject.GetComponent() != null; + #endif + } + #endif + } +} +#endif diff --git a/Assets/External/lilToon/External/Editor/VRChatModule.cs.meta b/Assets/External/lilToon/External/Editor/VRChatModule.cs.meta new file mode 100644 index 00000000..9ddbbe42 --- /dev/null +++ b/Assets/External/lilToon/External/Editor/VRChatModule.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70e462e0b8466484d80daad8d29b6f79 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef b/Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef new file mode 100644 index 00000000..4930f7ac --- /dev/null +++ b/Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef @@ -0,0 +1,34 @@ +{ + "name": "lilToon.Editor.External", + "rootNamespace": "", + "references": [ + "lilToon.Editor" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.vrchat.avatars", + "expression": "", + "define": "LILTOON_VRCSDK3_AVATARS" + }, + { + "name": "com.vrchat.worlds", + "expression": "", + "define": "LILTOON_VRCSDK3_WORLDS" + }, + { + "name": "com.vrchat.base", + "expression": "", + "define": "LILTOON_VRCSDK3" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef.meta b/Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef.meta new file mode 100644 index 00000000..a9fe44e4 --- /dev/null +++ b/Assets/External/lilToon/External/Editor/lilToon.Editor.External.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 814e85e19a2ab7d4d873e1630ad85654 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/LICENSE b/Assets/External/lilToon/LICENSE new file mode 100644 index 00000000..a3893bb5 --- /dev/null +++ b/Assets/External/lilToon/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020-present lilxyzw + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Assets/External/lilToon/LICENSE.meta b/Assets/External/lilToon/LICENSE.meta new file mode 100644 index 00000000..860e435a --- /dev/null +++ b/Assets/External/lilToon/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0ad54d988ad680e4e96036b7e5646f00 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Prefabs.meta b/Assets/External/lilToon/Prefabs.meta new file mode 100644 index 00000000..aee03de4 --- /dev/null +++ b/Assets/External/lilToon/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 805da3fd854cde54898f8263cf7aae78 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab b/Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab new file mode 100644 index 00000000..f49ecde7 --- /dev/null +++ b/Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99d4fa99d358f4269b65d0f56558468971bd1e7276b6400c54b7e8e07d9b8198 +size 2288 diff --git a/Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab.meta b/Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab.meta new file mode 100644 index 00000000..f502033c --- /dev/null +++ b/Assets/External/lilToon/Prefabs/FurCollider (range=x.xx22).prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8c80e2aa732631141a1b44d552a96d88 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets.meta b/Assets/External/lilToon/Presets.meta new file mode 100644 index 00000000..38db93ab --- /dev/null +++ b/Assets/External/lilToon/Presets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35817d21af2f3134182c4a7e4c07786b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Cloth-Anime.asset b/Assets/External/lilToon/Presets/Cloth-Anime.asset new file mode 100644 index 00000000..de26b0a4 --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Anime.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c53d825fb44cf4d2d258594c624f7a74ce62060a0ab34a69a1cab7d415680655 +size 9334 diff --git a/Assets/External/lilToon/Presets/Cloth-Anime.asset.meta b/Assets/External/lilToon/Presets/Cloth-Anime.asset.meta new file mode 100644 index 00000000..877f3d6e --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Anime.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 72377412f6a548c459a5e79549f29dff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Cloth-Illust.asset b/Assets/External/lilToon/Presets/Cloth-Illust.asset new file mode 100644 index 00000000..165a27f7 --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Illust.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:344462538f68ebee800ccbfbda8298e8127a31a38d12b255d2c280b9db264048 +size 5584 diff --git a/Assets/External/lilToon/Presets/Cloth-Illust.asset.meta b/Assets/External/lilToon/Presets/Cloth-Illust.asset.meta new file mode 100644 index 00000000..2cde3875 --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Illust.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 193de7d9d533d4841842d8c5ed740259 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Cloth-Outline.asset b/Assets/External/lilToon/Presets/Cloth-Outline.asset new file mode 100644 index 00000000..78e2e192 --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Outline.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:922c0abc3ce48cf7f4bf8172dd51a894b302eca5fe040d49be2dd9030168f0b0 +size 9329 diff --git a/Assets/External/lilToon/Presets/Cloth-Outline.asset.meta b/Assets/External/lilToon/Presets/Cloth-Outline.asset.meta new file mode 100644 index 00000000..b0b5f631 --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Outline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5132cf0fbee6ea540831dc73b68c8c25 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Cloth-Standard.asset b/Assets/External/lilToon/Presets/Cloth-Standard.asset new file mode 100644 index 00000000..98d27408 --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Standard.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5309a449e96384063f14bc315fdd8502255eb9c3755cb90204d500981420224 +size 7907 diff --git a/Assets/External/lilToon/Presets/Cloth-Standard.asset.meta b/Assets/External/lilToon/Presets/Cloth-Standard.asset.meta new file mode 100644 index 00000000..5f713902 --- /dev/null +++ b/Assets/External/lilToon/Presets/Cloth-Standard.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3af05fa678d24444199540173d53c648 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Hair-Anime.asset b/Assets/External/lilToon/Presets/Hair-Anime.asset new file mode 100644 index 00000000..0702ef2b --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Anime.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4868be19d0231a821e7e4f268dc3e416424594c49807b2071cbd529ff5ec6974 +size 9333 diff --git a/Assets/External/lilToon/Presets/Hair-Anime.asset.meta b/Assets/External/lilToon/Presets/Hair-Anime.asset.meta new file mode 100644 index 00000000..59ea25ff --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Anime.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13a5da17b9b512c45a20e627ef499e01 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Hair-Illust.asset b/Assets/External/lilToon/Presets/Hair-Illust.asset new file mode 100644 index 00000000..b01fdc80 --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Illust.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9630d3a07208ef5eedddaf7db7ef57b480df947cd78558fb6d7bb1501ededbe6 +size 5587 diff --git a/Assets/External/lilToon/Presets/Hair-Illust.asset.meta b/Assets/External/lilToon/Presets/Hair-Illust.asset.meta new file mode 100644 index 00000000..3d464511 --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Illust.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b66bf1309c6d60847ae978e0a54ac5fa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Hair-Outline.asset b/Assets/External/lilToon/Presets/Hair-Outline.asset new file mode 100644 index 00000000..7bc60828 --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Outline.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91ba058fe2aee878078dc0e0007e1596ce36f72065d1beb443152014f73d6f8d +size 9314 diff --git a/Assets/External/lilToon/Presets/Hair-Outline.asset.meta b/Assets/External/lilToon/Presets/Hair-Outline.asset.meta new file mode 100644 index 00000000..6a25da73 --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Outline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2357e878227675d4bade1cc9e4c2f8ca +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset b/Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset new file mode 100644 index 00000000..dd589eed --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdb0cb8afe4ca0c4db7b72d0f61a7b746081c4e1559f7d400c187c2b38c3b345 +size 9383 diff --git a/Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset.meta b/Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset.meta new file mode 100644 index 00000000..74942a75 --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-OutlineRimLight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1c73e759f4a3a5a44ba7bdc8688222d6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Hair-Standard.asset b/Assets/External/lilToon/Presets/Hair-Standard.asset new file mode 100644 index 00000000..4b8f2458 --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Standard.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c54c71715b3a15cf79f0476373b944e12017d9225f348f0d5511154f6a78200a +size 7892 diff --git a/Assets/External/lilToon/Presets/Hair-Standard.asset.meta b/Assets/External/lilToon/Presets/Hair-Standard.asset.meta new file mode 100644 index 00000000..9fd9f526 --- /dev/null +++ b/Assets/External/lilToon/Presets/Hair-Standard.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8e6edeb6e37727e419e0020134094068 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Inorganic-Glass.asset b/Assets/External/lilToon/Presets/Inorganic-Glass.asset new file mode 100644 index 00000000..cb61582f --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-Glass.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba94beaddbff42ff3e581d6a5ac15a3a88f1552e58afeda1cd583017869ddd53 +size 8144 diff --git a/Assets/External/lilToon/Presets/Inorganic-Glass.asset.meta b/Assets/External/lilToon/Presets/Inorganic-Glass.asset.meta new file mode 100644 index 00000000..bc2d23e0 --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-Glass.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c845c480ba4fcc4ca3814d63d57e84a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset b/Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset new file mode 100644 index 00000000..0024142b --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b552b9e3bc3d130a22c1a7d0408a24d3c52af58238c1121e1864cc59d96df805 +size 7931 diff --git a/Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset.meta b/Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset.meta new file mode 100644 index 00000000..9056d10e --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-LiteGlass.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e229834c4b98edf4694dfbf4007f3927 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset b/Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset new file mode 100644 index 00000000..1265b4d9 --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce223c73f04f71a3d2006f79c8ac28bd5076937f62ad6cf8ba99674b27e3d543 +size 4944 diff --git a/Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset.meta b/Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset.meta new file mode 100644 index 00000000..47965d65 --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-Metal (MatCap).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7f510b0fbfb36ad4285444097c033ed3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Inorganic-Metal.asset b/Assets/External/lilToon/Presets/Inorganic-Metal.asset new file mode 100644 index 00000000..c0820202 --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-Metal.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf6174495139a1df99324ef4f69442778cb14c1823e12aff4ab60219dee1ffaa +size 7862 diff --git a/Assets/External/lilToon/Presets/Inorganic-Metal.asset.meta b/Assets/External/lilToon/Presets/Inorganic-Metal.asset.meta new file mode 100644 index 00000000..8e472f8d --- /dev/null +++ b/Assets/External/lilToon/Presets/Inorganic-Metal.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e15c3abc25bfc0e45b18e369741eff76 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Nature-Fur.asset b/Assets/External/lilToon/Presets/Nature-Fur.asset new file mode 100644 index 00000000..cf3c131c --- /dev/null +++ b/Assets/External/lilToon/Presets/Nature-Fur.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e297af3ea9dfd32432f625c390fe3eb4a1138792845600382a6ade9bb2e70c7 +size 5481 diff --git a/Assets/External/lilToon/Presets/Nature-Fur.asset.meta b/Assets/External/lilToon/Presets/Nature-Fur.asset.meta new file mode 100644 index 00000000..bc516b58 --- /dev/null +++ b/Assets/External/lilToon/Presets/Nature-Fur.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c58d8c29115455b439bf6ad346fc558b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Skin-Anime.asset b/Assets/External/lilToon/Presets/Skin-Anime.asset new file mode 100644 index 00000000..9fcafbfa --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Anime.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d59977122f07f4d2a606e95280b3c5f3ace2905acfc95cf138224a544c615a8d +size 9299 diff --git a/Assets/External/lilToon/Presets/Skin-Anime.asset.meta b/Assets/External/lilToon/Presets/Skin-Anime.asset.meta new file mode 100644 index 00000000..8fef077a --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Anime.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 322c901472f2b9a4d98da370ea954214 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Skin-Flat.asset b/Assets/External/lilToon/Presets/Skin-Flat.asset new file mode 100644 index 00000000..5d1df4fa --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Flat.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d312c5fd440d8938265cb48274d6f76a38a8e352cc0d85d09fa1943072de8493 +size 7850 diff --git a/Assets/External/lilToon/Presets/Skin-Flat.asset.meta b/Assets/External/lilToon/Presets/Skin-Flat.asset.meta new file mode 100644 index 00000000..392b284f --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Flat.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 125301c732c00f84091ef099d83833b7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Skin-Illust.asset b/Assets/External/lilToon/Presets/Skin-Illust.asset new file mode 100644 index 00000000..a31b6cfe --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Illust.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dc17ab87d095332a9480c094bf3833bc29d4c607eef08f44e0c86757584c1b1 +size 5512 diff --git a/Assets/External/lilToon/Presets/Skin-Illust.asset.meta b/Assets/External/lilToon/Presets/Skin-Illust.asset.meta new file mode 100644 index 00000000..4751c382 --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Illust.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 44e146d270da72d4cb21a0a3b8658d1a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Skin-Outline.asset b/Assets/External/lilToon/Presets/Skin-Outline.asset new file mode 100644 index 00000000..2fe563e6 --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Outline.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12192935ae9e0b10a3f60ab9fde3bc4c0a1642aacc6283acfc81698c0f4254d4 +size 9299 diff --git a/Assets/External/lilToon/Presets/Skin-Outline.asset.meta b/Assets/External/lilToon/Presets/Skin-Outline.asset.meta new file mode 100644 index 00000000..1cbcccd1 --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-Outline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7d0193c3ed109f040bafea9b2a6a17b6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Presets/Skin-OutlineShadow.asset b/Assets/External/lilToon/Presets/Skin-OutlineShadow.asset new file mode 100644 index 00000000..89ac3ef8 --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-OutlineShadow.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50acfb2d63c6333e80b8af6bca77ab50d3351fd8b242de00bef7c7a70ea261b9 +size 9319 diff --git a/Assets/External/lilToon/Presets/Skin-OutlineShadow.asset.meta b/Assets/External/lilToon/Presets/Skin-OutlineShadow.asset.meta new file mode 100644 index 00000000..12697c49 --- /dev/null +++ b/Assets/External/lilToon/Presets/Skin-OutlineShadow.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dbec582958af3f340988b3ff86a12633 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/README.md b/Assets/External/lilToon/README.md new file mode 100644 index 00000000..1d73e7cb --- /dev/null +++ b/Assets/External/lilToon/README.md @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:347c3befde7dcc7d4ea6e9181236175a7680795466659a5a1e7dca985b68846d +size 6542 diff --git a/Assets/External/lilToon/README.md.meta b/Assets/External/lilToon/README.md.meta new file mode 100644 index 00000000..b66af6fc --- /dev/null +++ b/Assets/External/lilToon/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eed4a4536acc30b419b91c2bf1ca399e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/README_JP.md b/Assets/External/lilToon/README_JP.md new file mode 100644 index 00000000..e122d1de --- /dev/null +++ b/Assets/External/lilToon/README_JP.md @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b113509a0dc57faec7e619f844d7ccdb1feb30c366332ef5e24626f32b01fc7 +size 8244 diff --git a/Assets/External/lilToon/README_JP.md.meta b/Assets/External/lilToon/README_JP.md.meta new file mode 100644 index 00000000..d318cdc7 --- /dev/null +++ b/Assets/External/lilToon/README_JP.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 50fe6c2708c26874aa2586ef9f6f9cad +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader.meta b/Assets/External/lilToon/Shader.meta new file mode 100644 index 00000000..f4681355 --- /dev/null +++ b/Assets/External/lilToon/Shader.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ac0a8f602b5e72f458f4914bf08f0269 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes.meta b/Assets/External/lilToon/Shader/Includes.meta new file mode 100644 index 00000000..e4627e61 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e14f2053e401f3b409de122509e9b34e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/GTModelDecode.cginc b/Assets/External/lilToon/Shader/Includes/GTModelDecode.cginc new file mode 100644 index 00000000..e69de29b diff --git a/Assets/External/lilToon/Shader/Includes/GTModelDecode.cginc.meta b/Assets/External/lilToon/Shader/Includes/GTModelDecode.cginc.meta new file mode 100644 index 00000000..e6ca2fc5 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/GTModelDecode.cginc.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7d3136ba82c46534ea3f72a408f36322 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common.hlsl new file mode 100644 index 00000000..8f6950cd --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common.hlsl @@ -0,0 +1,217 @@ + + +#ifndef LIL_COMMON_INCLUDED +#define LIL_COMMON_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Debug + +// Show all warning +//#pragma warning(default: 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209) +//#pragma warning(default: 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588) +//#pragma warning(default: 4700 4701 4702 4703 4704 4705 4706 4707 4708 4710 4711 4712 4713 4714 4715 4716 4717) +//#pragma warning(disable: 3571) + +// Ignore warning +#pragma warning(disable: 3033 4001 4008 4009 4010 4116 4117) +#pragma warning(disable: 3568) + +//------------------------------------------------------------------------------------------------------------------------------ +// Common +#if defined(LIL_LITE) || defined(LIL_MULTI) || defined(LIL_IGNORE_SHADERSETTING) + #define LIL_OPTIMIZE_APPLY_SHADOW_FA +#endif +#include "lil_common_macro.hlsl" +#include "lil_common_input.hlsl" + +// Omission of if statement +// lilToonMulti branches using shader keywords +#if defined(LIL_MULTI) + #define _UseMain2ndTex true + #define _UseMain3rdTex true + #define _UseShadow true + #define _UseRimShade true + #define _UseBacklight true + #define _UseBumpMap true + #define _UseBump2ndMap true + #define _UseAnisotropy true + #define _UseReflection true + #define _UseMatCap true + #define _UseMatCap2nd true + #define _UseRim true + #define _UseGlitter true + #define _UseEmission true + #define _UseEmission2nd true + #define _UseParallax true + #define _UseAudioLink true + #define _AudioLinkAsLocal true + #define LIL_MULTI_SHOULD_CLIPPING && _UseClippingCanceller +#else + #define LIL_MULTI_SHOULD_CLIPPING +#endif + +#include "lil_common_functions.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure for fragment shader +struct lilFragData +{ + // Color + float4 col; + float3 albedo; + float3 emissionColor; + + // Light Color + float3 lightColor; + float3 indLightColor; + float3 addLightColor; + float attenuation; + float3 invLighting; + + // UV + float2 uv0; + float2 uv1; + float2 uv2; + float2 uv3; + float2 uvMain; + float2 uvMat; + float2 uvRim; + float2 uvPanorama; + float2 uvScn; + float2 ddxMain; + float2 ddyMain; + bool isRightHand; + bool dissolveActive, dissolveInvert; + + // Position + float3 positionOS; + float3 positionWS; + float4 positionCS; + float4 positionSS; + float depth; + float depthObject; + + // Vector + float3 cameraFront; + float3 cameraUp; + float3 cameraRight; + float3x3 cameraMatrix; + float3x3 TBN; + float3 T; + float3 B; + float3 N; + float3 V; + float3 L; + float3 origN; + float3 origL; + float3 headV; + float3 reflectionN; + float3 matcapN; + float3 matcap2ndN; + float facing; + + // Dot + float vl; + float hl; + float ln; + float nv; + float nvabs; + + // Shading Data + float4 triMask; + float3 parallaxViewDirection; + float2 parallaxOffset; + float anisotropy; + float smoothness; + float roughness; + float perceptualRoughness; + float shadowmix; + float audioLinkValue; + + // HDRP Data + uint renderingLayers; + uint featureFlags; + uint2 tileIndex; +}; + +lilFragData lilInitFragData() +{ + lilFragData fd; + + fd.col = 1.0; + fd.albedo = 1.0; + fd.emissionColor = 0.0; + + fd.lightColor = 1.0; + fd.indLightColor = 0.0; + fd.addLightColor = 0.0; + fd.attenuation = 1.0; + fd.invLighting = 0.0; + + fd.uv0 = 0.0; + fd.uv1 = 0.0; + fd.uv2 = 0.0; + fd.uv3 = 0.0; + fd.uvMain = 0.0; + fd.uvMat = 0.0; + fd.uvRim = 0.0; + fd.uvPanorama = 0.0; + fd.uvScn = 0.0; + fd.ddxMain = 0.0; + fd.ddyMain = 0.0; + fd.isRightHand = true; + fd.dissolveActive = true; + fd.dissolveInvert = false; + + fd.positionOS = 0.0; + fd.positionWS = 0.0; + fd.positionCS = 0.0; + fd.positionSS = 0.0; + fd.depth = 0.0; + fd.depthObject = 0.0; + + fd.cameraFront = lilCameraDirection(); + fd.cameraUp = lilCameraUp(); + fd.cameraRight = lilCameraRight(); + fd.cameraMatrix = float3x3(fd.cameraRight, fd.cameraUp, fd.cameraFront); + fd.TBN = float3x3( + 1.0,0.0,0.0, + 0.0,1.0,0.0, + 0.0,0.0,1.0); + fd.T = 0.0; + fd.B = 0.0; + fd.N = 0.0; + fd.V = 0.0; + fd.L = float3(0.0, 1.0, 0.0); + fd.origN = 0.0; + fd.origL = float3(0.0, 1.0, 0.0); + fd.headV = 0.0; + fd.reflectionN = 0.0; + fd.matcapN = 0.0; + fd.matcap2ndN = 0.0; + fd.facing = 1.0; + + fd.vl = 0.0; + fd.hl = 0.0; + fd.ln = 0.0; + fd.nv = 0.0; + fd.nvabs = 0.0; + + fd.triMask = 1.0; + fd.parallaxViewDirection = 0.0; + fd.parallaxOffset = 0.0; + fd.anisotropy = 0.0; + fd.smoothness = 1.0; + fd.roughness = 1.0; + fd.perceptualRoughness = 1.0; + fd.shadowmix = 1.0; + fd.audioLinkValue = 1.0; + + fd.renderingLayers = 0; + fd.featureFlags = 0; + fd.tileIndex = 0; + + return fd; +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common.hlsl.meta new file mode 100644 index 00000000..985f4eba --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5520e766422958546bbe885a95d5a67e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl new file mode 100644 index 00000000..e075e31e --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl @@ -0,0 +1,273 @@ +#ifndef LIL_APPDATA_INCLUDED +#define LIL_APPDATA_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Appdata +#if defined(LIL_REQUIRE_APP_PREVPOS) || defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + #define LIL_APP_PREVPOS +#endif + +#if defined(LIL_REQUIRE_APP_PREVEL) || defined(_ADD_PRECOMPUTED_VELOCITY) + #define LIL_APP_PREVEL +#endif + +#define LIL_APP_POSITION +#define LIL_APP_TEXCOORD0 +#define LIL_APP_TEXCOORD1 +#define LIL_APP_TEXCOORD2 +#define LIL_APP_TEXCOORD3 + +/* +#if defined(LIL_REQUIRE_APP_POSITION) +#endif + +#if defined(LIL_REQUIRE_APP_TEXCOORD0) +#endif + +#if defined(LIL_REQUIRE_APP_TEXCOORD1) +#endif + +#if defined(LIL_REQUIRE_APP_TEXCOORD2) +#endif + +#if defined(LIL_REQUIRE_APP_TEXCOORD3) +#endif +*/ + +#if !defined(LIL_APP_PREVPOS) && (defined(LIL_REQUIRE_APP_TEXCOORD4) || defined(LIL_FEATURE_IDMASK) && !defined(LIL_LITE)) + #define LIL_APP_TEXCOORD4 +#endif + +#if !defined(LIL_APP_PREVEL) && (defined(LIL_REQUIRE_APP_TEXCOORD5) || defined(LIL_FEATURE_IDMASK) && !defined(LIL_LITE)) + #define LIL_APP_TEXCOORD5 +#endif + +#if defined(LIL_REQUIRE_APP_TEXCOORD6) || (defined(LIL_FEATURE_IDMASK) || defined(LIL_FEATURE_ENCRYPTION)) && !defined(LIL_LITE) + #define LIL_APP_TEXCOORD6 +#endif + +#if defined(LIL_REQUIRE_APP_TEXCOORD7) || (defined(LIL_FEATURE_IDMASK) || defined(LIL_FEATURE_ENCRYPTION)) && !defined(LIL_LITE) + #define LIL_APP_TEXCOORD7 +#endif + +#if defined(LIL_REQUIRE_APP_COLOR) || defined(LIL_OUTLINE) || defined(LIL_ONEPASS_OUTLINE) || (!defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) && defined(LIL_FUR)) + #define LIL_APP_COLOR +#endif + +#if defined(LIL_REQUIRE_APP_NORMAL) || defined(LIL_SHOULD_NORMAL) || defined(LIL_FEATURE_ENCRYPTION) || defined(LIL_OUTLINE) || defined(LIL_LITE) || defined(LIL_GEM) || defined(LIL_PASS_FORWARD_FUR_INCLUDED) || ((defined(LIL_PASS_DEPTHONLY_INCLUDED) || defined(LIL_PASS_MOTIONVECTOR_INCLUDED)) && defined(LIL_FUR)) || defined(LIL_TESSELLATION) || defined(LIL_PASS_DEPTHNORMAL_INCLUDED) || defined(WRITE_NORMAL_BUFFER) || defined(LIL_PASS_SHADOWCASTER_INCLUDED) + #define LIL_APP_NORMAL +#endif + +#if defined(LIL_REQUIRE_APP_TANGENT) || ((defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) || defined(LIL_GEM)) && defined(LIL_SHOULD_TANGENT)) || defined(LIL_OUTLINE) || defined(LIL_PASS_FORWARD_FUR_INCLUDED) || (!defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) && defined(LIL_FUR)) || defined(LIL_BAKER) + #define LIL_APP_TANGENT +#endif + +#if !defined(LIL_NOT_SUPPORT_VERTEXID) && (defined(LIL_REQUIRE_APP_VERTEXID) || defined(LIL_FEATURE_IDMASK) || defined(LIL_FUR)) + #define LIL_APP_VERTEXID +#endif + +struct appdata +{ + #if defined(LIL_APP_POSITION) + float4 positionOS : POSITION; + #endif + #if defined(LIL_APP_TEXCOORD0) + float2 uv0 : TEXCOORD0; + #endif + #if defined(LIL_APP_TEXCOORD1) + float2 uv1 : TEXCOORD1; + #endif + #if defined(LIL_APP_TEXCOORD2) + float2 uv2 : TEXCOORD2; + #endif + #if defined(LIL_APP_TEXCOORD3) + float2 uv3 : TEXCOORD3; + #endif + #if defined(LIL_APP_TEXCOORD4) + float2 uv4 : TEXCOORD4; + #endif + #if defined(LIL_APP_TEXCOORD5) + float2 uv5 : TEXCOORD5; + #endif + #if defined(LIL_APP_TEXCOORD6) + float2 uv6 : TEXCOORD6; + #endif + #if defined(LIL_APP_TEXCOORD7) + float2 uv7 : TEXCOORD7; + #endif + #if defined(LIL_APP_COLOR) + float4 color : COLOR; + #endif + #if defined(LIL_APP_NORMAL) + float3 normalOS : NORMAL; + #endif + #if defined(LIL_APP_TANGENT) + float4 tangentOS : TANGENT; + #endif + #if defined(LIL_APP_VERTEXID) + uint vertexID : SV_VertexID; + #endif + #if defined(LIL_APP_PREVPOS) + float3 previousPositionOS : TEXCOORD4; + #endif + #if defined(LIL_APP_PREVEL) + float3 precomputedVelocity : TEXCOORD5; + #endif + LIL_VERTEX_INPUT_INSTANCE_ID +}; + +struct appdataCopy +{ + #if defined(LIL_APP_POSITION) + float4 positionOS : POSITION; + #endif + #if defined(LIL_APP_TEXCOORD0) + float2 uv0 : TEXCOORD0; + #endif + #if defined(LIL_APP_TEXCOORD1) + float2 uv1 : TEXCOORD1; + #endif + #if defined(LIL_APP_TEXCOORD2) + float2 uv2 : TEXCOORD2; + #endif + #if defined(LIL_APP_TEXCOORD3) + float2 uv3 : TEXCOORD3; + #endif + #if defined(LIL_APP_TEXCOORD4) + float2 uv4 : TEXCOORD4; + #endif + #if defined(LIL_APP_TEXCOORD5) + float2 uv5 : TEXCOORD5; + #endif + #if defined(LIL_APP_TEXCOORD6) + float2 uv6 : TEXCOORD6; + #endif + #if defined(LIL_APP_TEXCOORD7) + float2 uv7 : TEXCOORD7; + #endif + #if defined(LIL_APP_COLOR) + float4 color : COLOR; + #endif + #if defined(LIL_APP_NORMAL) + float3 normalOS : NORMAL; + #endif + #if defined(LIL_APP_TANGENT) + float4 tangentOS : TANGENT; + #endif + #if defined(LIL_APP_VERTEXID) + uint vertexID : TEXCOORD8; // avoid error + #endif + #if defined(LIL_APP_PREVPOS) + float3 previousPositionOS : TEXCOORD4; + #endif + #if defined(LIL_APP_PREVEL) + float3 precomputedVelocity : TEXCOORD5; + #endif + LIL_VERTEX_INPUT_INSTANCE_ID +}; + +appdataCopy appdataOriginalToCopy(appdata i) +{ + appdataCopy o; + #if defined(LIL_APP_POSITION) + o.positionOS = i.positionOS; + #endif + #if defined(LIL_APP_TEXCOORD0) + o.uv0 = i.uv0; + #endif + #if defined(LIL_APP_TEXCOORD1) + o.uv1 = i.uv1; + #endif + #if defined(LIL_APP_TEXCOORD2) + o.uv2 = i.uv2; + #endif + #if defined(LIL_APP_TEXCOORD3) + o.uv3 = i.uv3; + #endif + #if defined(LIL_APP_TEXCOORD4) + o.uv4 = i.uv4; + #endif + #if defined(LIL_APP_TEXCOORD5) + o.uv5 = i.uv5; + #endif + #if defined(LIL_APP_TEXCOORD6) + o.uv6 = i.uv6; + #endif + #if defined(LIL_APP_TEXCOORD7) + o.uv7 = i.uv7; + #endif + #if defined(LIL_APP_COLOR) + o.color = i.color; + #endif + #if defined(LIL_APP_NORMAL) + o.normalOS = i.normalOS; + #endif + #if defined(LIL_APP_TANGENT) + o.tangentOS = i.tangentOS; + #endif + #if defined(LIL_APP_VERTEXID) + o.vertexID = i.vertexID; + #endif + #if defined(LIL_APP_PREVPOS) + o.previousPositionOS = i.previousPositionOS; + #endif + #if defined(LIL_APP_PREVEL) + o.precomputedVelocity = i.precomputedVelocity; + #endif + LIL_TRANSFER_INSTANCE_ID(i, o); + return o; +} + +appdata appdataCopyToOriginal(appdataCopy i) +{ + appdata o; + #if defined(LIL_APP_POSITION) + o.positionOS = i.positionOS; + #endif + #if defined(LIL_APP_TEXCOORD0) + o.uv0 = i.uv0; + #endif + #if defined(LIL_APP_TEXCOORD1) + o.uv1 = i.uv1; + #endif + #if defined(LIL_APP_TEXCOORD2) + o.uv2 = i.uv2; + #endif + #if defined(LIL_APP_TEXCOORD3) + o.uv3 = i.uv3; + #endif + #if defined(LIL_APP_TEXCOORD4) + o.uv4 = i.uv4; + #endif + #if defined(LIL_APP_TEXCOORD5) + o.uv5 = i.uv5; + #endif + #if defined(LIL_APP_TEXCOORD6) + o.uv6 = i.uv6; + #endif + #if defined(LIL_APP_TEXCOORD7) + o.uv7 = i.uv7; + #endif + #if defined(LIL_APP_COLOR) + o.color = i.color; + #endif + #if defined(LIL_APP_NORMAL) + o.normalOS = i.normalOS; + #endif + #if defined(LIL_APP_TANGENT) + o.tangentOS = i.tangentOS; + #endif + #if defined(LIL_APP_VERTEXID) + o.vertexID = i.vertexID; + #endif + #if defined(LIL_APP_PREVPOS) + o.previousPositionOS = i.previousPositionOS; + #endif + #if defined(LIL_APP_PREVEL) + o.precomputedVelocity = i.precomputedVelocity; + #endif + LIL_TRANSFER_INSTANCE_ID(i, o); + return o; +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl.meta new file mode 100644 index 00000000..46b8ff71 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_appdata.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 17c02a1ea49f2d542adfe023f45e7810 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl new file mode 100644 index 00000000..c0742806 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl @@ -0,0 +1,2078 @@ +//------------------------------------------------------------------------------------------------------------------------------ +// PS Macro + +// Insert for custom shader +#if !defined(BEFORE_UNPACK_V2F) + #define BEFORE_UNPACK_V2F +#endif + +#if !defined(BEFORE_ANIMATE_MAIN_UV) + #define BEFORE_ANIMATE_MAIN_UV +#endif + +#if !defined(BEFORE_ANIMATE_OUTLINE_UV) + #define BEFORE_ANIMATE_OUTLINE_UV +#endif + +#if !defined(BEFORE_CALC_DDX_DDY) + #define BEFORE_CALC_DDX_DDY +#endif + +#if !defined(BEFORE_PARALLAX) + #define BEFORE_PARALLAX +#endif + +#if !defined(BEFORE_MAIN) + #define BEFORE_MAIN +#endif + +#if !defined(BEFORE_OUTLINE_COLOR) + #define BEFORE_OUTLINE_COLOR +#endif + +#if !defined(BEFORE_FUR) + #define BEFORE_FUR +#endif + +#if !defined(BEFORE_ALPHAMASK) + #define BEFORE_ALPHAMASK +#endif + +#if !defined(BEFORE_DISSOLVE) + #define BEFORE_DISSOLVE +#endif + +#if !defined(BEFORE_DITHER) + #define BEFORE_DITHER +#endif + +#if !defined(BEFORE_NORMAL_1ST) + #define BEFORE_NORMAL_1ST +#endif + +#if !defined(BEFORE_NORMAL_2ND) + #define BEFORE_NORMAL_2ND +#endif + +#if !defined(BEFORE_ANISOTROPY) + #define BEFORE_ANISOTROPY +#endif + +#if !defined(BEFORE_AUDIOLINK) + #define BEFORE_AUDIOLINK +#endif + +#if !defined(BEFORE_MAIN2ND) + #define BEFORE_MAIN2ND +#endif + +#if !defined(BEFORE_MAIN3RD) + #define BEFORE_MAIN3RD +#endif + +#if !defined(BEFORE_SHADOW) + #define BEFORE_SHADOW +#endif + +#if !defined(BEFORE_RIMSHADE) + #define BEFORE_RIMSHADE +#endif + +#if !defined(BEFORE_BACKLIGHT) + #define BEFORE_BACKLIGHT +#endif + +#if !defined(BEFORE_REFRACTION) + #define BEFORE_REFRACTION +#endif + +#if !defined(BEFORE_REFLECTION) + #define BEFORE_REFLECTION +#endif + +#if !defined(BEFORE_MATCAP) + #define BEFORE_MATCAP +#endif + +#if !defined(BEFORE_MATCAP_2ND) + #define BEFORE_MATCAP_2ND +#endif + +#if !defined(BEFORE_RIMLIGHT) + #define BEFORE_RIMLIGHT +#endif + +#if !defined(BEFORE_GLITTER) + #define BEFORE_GLITTER +#endif + +#if !defined(BEFORE_EMISSION_1ST) + #define BEFORE_EMISSION_1ST +#endif + +#if !defined(BEFORE_EMISSION_2ND) + #define BEFORE_EMISSION_2ND +#endif + +#if !defined(BEFORE_DISSOLVE_ADD) + #define BEFORE_DISSOLVE_ADD +#endif + +#if !defined(BEFORE_BLEND_EMISSION) + #define BEFORE_BLEND_EMISSION +#endif + +#if !defined(BEFORE_DEPTH_FADE) + #define BEFORE_DEPTH_FADE +#endif + +#if !defined(BEFORE_DISTANCE_FADE) + #define BEFORE_DISTANCE_FADE +#endif + +#if !defined(BEFORE_FOG) + #define BEFORE_FOG +#endif + +#if !defined(BEFORE_OUTPUT) + #define BEFORE_OUTPUT +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Override + +//------------------------------------------------------------------------------------------------------------------------------ +// Unpack v2f +#if defined(LIL_V2F_PACKED_TEXCOORD01) + #define LIL_UNPACK_TEXCOORD0(i,o) o.uv0 = i.uv01.xy; +#elif defined(LIL_V2F_TEXCOORD0) + #define LIL_UNPACK_TEXCOORD0(i,o) o.uv0 = i.uv0; +#else + #define LIL_UNPACK_TEXCOORD0(i,o) +#endif + +#if defined(LIL_V2F_PACKED_TEXCOORD01) + #define LIL_UNPACK_TEXCOORD1(i,o) o.uv1 = i.uv01.zw; +#elif defined(LIL_V2F_TEXCOORD1) + #define LIL_UNPACK_TEXCOORD1(i,o) o.uv1 = i.uv1; +#else + #define LIL_UNPACK_TEXCOORD1(i,o) +#endif + +#if defined(LIL_V2F_PACKED_TEXCOORD23) + #define LIL_UNPACK_TEXCOORD2(i,o) o.uv2 = i.uv23.xy; +#elif defined(LIL_V2F_TEXCOORD2) + #define LIL_UNPACK_TEXCOORD2(i,o) o.uv2 = i.uv2; +#else + #define LIL_UNPACK_TEXCOORD2(i,o) +#endif + +#if defined(LIL_V2F_PACKED_TEXCOORD23) + #define LIL_UNPACK_TEXCOORD3(i,o) o.uv3 = i.uv23.zw; +#elif defined(LIL_V2F_TEXCOORD3) + #define LIL_UNPACK_TEXCOORD3(i,o) o.uv3 = i.uv3; +#else + #define LIL_UNPACK_TEXCOORD3(i,o) +#endif + +#if defined(LIL_V2F_UVMAT) + #define LIL_UNPACK_TEXCOORD_MAT(i,o) o.uvMat = i.uvMat; +#else + #define LIL_UNPACK_TEXCOORD_MAT(i,o) +#endif + +#if defined(LIL_V2F_POSITION_OS) + #define LIL_UNPACK_POSITION_OS(i,o) \ + o.positionOS = i.positionOSdissolve.xyz; \ + o.dissolveActive = ((int)round(i.positionOSdissolve.w)) & 1; \ + o.dissolveInvert = ((int)round(i.positionOSdissolve.w)) & 2; +#else + #define LIL_UNPACK_POSITION_OS(i,o) +#endif + +#if defined(LIL_V2F_POSITION_WS) + #define LIL_UNPACK_POSITION_WS(i,o) o.positionWS = lilToAbsolutePositionWS(i.positionWS); +#else + #define LIL_UNPACK_POSITION_WS(i,o) +#endif + +#if defined(LIL_V2F_POSITION_CS) + #if defined(UNITY_SINGLE_PASS_STEREO) && !(defined(LIL_BRP) && !defined(LIL_LWTEX) && defined(LIL_REFRACTION)) + #define LIL_SCREEN_UV_STEREO_FIX(i,o) o.uvScn.x *= 0.5; + #else + #define LIL_SCREEN_UV_STEREO_FIX(i,o) + #endif + + #if defined(LIL_BRP) && !defined(LIL_LWTEX) && defined(LIL_REFRACTION) && defined(LIL_REFRACTION_BLUR2) + #define LIL_RES_XY lilGetWidthAndHeight(_GrabTexture) + #elif defined(LIL_BRP) && !defined(LIL_LWTEX) && defined(LIL_REFRACTION) + #define LIL_RES_XY lilGetWidthAndHeight(_lilBackgroundTexture) + #else + #define LIL_RES_XY (LIL_SCREENPARAMS.xy) + #endif + + #define LIL_UNPACK_POSITION_CS(i,o) \ + o.positionCS = i.positionCS; \ + o.positionSS = lilTransformCStoSSFrag(i.positionCS); \ + o.uvScn = i.positionCS.xy / LIL_RES_XY; \ + LIL_SCREEN_UV_STEREO_FIX(i,o) +#else + #define LIL_UNPACK_POSITION_CS(i,o) +#endif + +#if defined(LIL_V2F_LIGHTDIRECTION) && !defined(LIL_HDRP) + #define LIL_UNPACK_LIGHT_DIRECTION(i,o) \ + fd.L = input.lightDirection; \ + fd.origL = LIL_MAINLIGHT_DIRECTION; +#elif defined(LIL_V2F_LIGHTDIRECTION) + #define LIL_UNPACK_LIGHT_DIRECTION(i,o) \ + fd.L = input.lightDirection; \ + fd.origL = input.lightDirection; +#else + #define LIL_UNPACK_LIGHT_DIRECTION(i,o) +#endif + +#if defined(LIL_V2F_INDLIGHTCOLOR) + #define LIL_UNPACK_INDLIGHTCOLOR(i,o) LIL_GET_INDLIGHTCOLOR(i,o) +#else + #define LIL_UNPACK_INDLIGHTCOLOR(i,o) +#endif + +#define OVERRIDE_UNPACK_V2F \ + LIL_UNPACK_TEXCOORD0(input,fd); \ + LIL_UNPACK_TEXCOORD1(input,fd); \ + LIL_UNPACK_TEXCOORD2(input,fd); \ + LIL_UNPACK_TEXCOORD3(input,fd); \ + LIL_UNPACK_TEXCOORD_MAT(input,fd); \ + LIL_UNPACK_POSITION_OS(input,fd); \ + LIL_UNPACK_POSITION_WS(input,fd); \ + LIL_UNPACK_POSITION_CS(input,fd); \ + LIL_UNPACK_LIGHT_DIRECTION(input,fd); \ + LIL_UNPACK_INDLIGHTCOLOR(input,fd); + +//------------------------------------------------------------------------------------------------------------------------------ +// UV Animation +#if !defined(OVERRIDE_ANIMATE_MAIN_UV) + #if defined(LIL_PASS_META_INCLUDED) && (defined(LIL_FEATURE_ANIMATE_MAIN_UV) || defined(LIL_LITE)) + #define OVERRIDE_ANIMATE_MAIN_UV \ + fd.uvMain = lilCalcDoubleSideUV(fd.uv0, fd.facing, _ShiftBackfaceUV); \ + fd.uvMain = lilCalcUVWithoutAnimation(fd.uvMain, _MainTex_ST, _MainTex_ScrollRotate); + #elif defined(LIL_FEATURE_ANIMATE_MAIN_UV) || defined(LIL_LITE) + #define OVERRIDE_ANIMATE_MAIN_UV \ + fd.uvMain = lilCalcDoubleSideUV(fd.uv0, fd.facing, _ShiftBackfaceUV); \ + fd.uvMain = lilCalcUV(fd.uvMain, _MainTex_ST, _MainTex_ScrollRotate); + #elif !defined(LIL_PASS_FORWARD_FUR_INCLUDED) + #define OVERRIDE_ANIMATE_MAIN_UV \ + fd.uvMain = lilCalcDoubleSideUV(fd.uv0, fd.facing, _ShiftBackfaceUV); \ + fd.uvMain = lilCalcUV(fd.uvMain, _MainTex_ST); + #else + #define OVERRIDE_ANIMATE_MAIN_UV \ + fd.uvMain = lilCalcUV(fd.uv0, _MainTex_ST); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Outline UV Animation +#if !defined(OVERRIDE_ANIMATE_OUTLINE_UV) + #if defined(LIL_FEATURE_ANIMATE_OUTLINE_UV) || defined(LIL_LITE) + #define OVERRIDE_ANIMATE_OUTLINE_UV \ + fd.uvMain = lilCalcUV(fd.uv0, _OutlineTex_ST, _OutlineTex_ScrollRotate); + #else + #define OVERRIDE_ANIMATE_OUTLINE_UV \ + fd.uvMain = lilCalcUV(fd.uv0, _OutlineTex_ST); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// DDX and DDY +#define OVERRIDE_CALC_DDX_DDY \ + fd.ddxMain = abs(ddx(fd.uvMain)); \ + fd.ddyMain = abs(ddy(fd.uvMain)); + +//------------------------------------------------------------------------------------------------------------------------------ +// Parallax +#if !defined(OVERRIDE_PARALLAX) + #if defined(LIL_MULTI) && defined(LIL_FEATURE_POM) + #define OVERRIDE_PARALLAX \ + lilPOM(fd.uvMain, fd.uv0, _UseParallax, _MainTex_ST, fd.parallaxViewDirection, _ParallaxMap, _Parallax, _ParallaxOffset); + #elif defined(LIL_FEATURE_POM) + #define OVERRIDE_PARALLAX \ + if(_UsePOM) lilPOM(fd.uvMain, fd.uv0, _UseParallax, _MainTex_ST, fd.parallaxViewDirection, _ParallaxMap, _Parallax, _ParallaxOffset); \ + else lilParallax(fd.uvMain, fd.uv0, _UseParallax, fd.parallaxOffset, _ParallaxMap, _Parallax, _ParallaxOffset); + #else + #define OVERRIDE_PARALLAX \ + lilParallax(fd.uvMain, fd.uv0, _UseParallax, fd.parallaxOffset, _ParallaxMap, _Parallax, _ParallaxOffset); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Main Texture +#if defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) + #define LIL_GET_MAIN_TEX \ + fd.col = LIL_SAMPLE_2D_POM(_MainTex, sampler_MainTex, fd.uvMain, fd.ddxMain, fd.ddyMain); + + // Tone correction + #if defined(LIL_FEATURE_MAIN_TONE_CORRECTION) + #define LIL_MAIN_TONECORRECTION \ + fd.col.rgb = lilToneCorrection(fd.col.rgb, _MainTexHSVG); + #else + #define LIL_MAIN_TONECORRECTION + #endif + + // Gradation map + #if defined(LIL_FEATURE_MAIN_GRADATION_MAP) && defined(LIL_FEATURE_MainGradationTex) + #define LIL_MAIN_GRADATION_MAP \ + fd.col.rgb = lilGradationMap(fd.col.rgb, _MainGradationTex, _MainGradationStrength); + #else + #define LIL_MAIN_GRADATION_MAP + #endif + + #if defined(LIL_FEATURE_MainColorAdjustMask) + #define LIL_SAMPLE_MainColorAdjustMask colorAdjustMask = LIL_SAMPLE_2D(_MainColorAdjustMask, sampler_MainTex, fd.uvMain).r + #else + #define LIL_SAMPLE_MainColorAdjustMask + #endif + + #if defined(LIL_FEATURE_MAIN_TONE_CORRECTION) || defined(LIL_FEATURE_MAIN_GRADATION_MAP) + #define LIL_APPLY_MAIN_TONECORRECTION \ + float3 beforeToneCorrectionColor = fd.col.rgb; \ + float colorAdjustMask = 1.0; \ + LIL_SAMPLE_MainColorAdjustMask; \ + LIL_MAIN_TONECORRECTION \ + LIL_MAIN_GRADATION_MAP \ + fd.col.rgb = lerp(beforeToneCorrectionColor, fd.col.rgb, colorAdjustMask); + #else + #define LIL_APPLY_MAIN_TONECORRECTION + #endif +#else + #define LIL_GET_MAIN_TEX \ + fd.col = LIL_SAMPLE_2D(_MainTex, sampler_MainTex, fd.uvMain); + #define LIL_APPLY_MAIN_TONECORRECTION +#endif + +#if !defined(OVERRIDE_MAIN) + #define OVERRIDE_MAIN \ + LIL_GET_MAIN_TEX \ + LIL_APPLY_MAIN_TONECORRECTION \ + fd.col *= _Color; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Outline Color +#if defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) && defined(LIL_FEATURE_OutlineTex) || !defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) + #define LIL_GET_OUTLINE_TEX \ + fd.col = LIL_SAMPLE_2D(_OutlineTex, sampler_OutlineTex, fd.uvMain); +#else + #define LIL_GET_OUTLINE_TEX +#endif + +#if defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) && defined(LIL_FEATURE_OutlineTex) && defined(LIL_FEATURE_OUTLINE_TONE_CORRECTION) + #define LIL_APPLY_OUTLINE_TONECORRECTION \ + fd.col.rgb = lilToneCorrection(fd.col.rgb, _OutlineTexHSVG); +#else + #define LIL_APPLY_OUTLINE_TONECORRECTION +#endif + +#if defined(LIL_USE_SHADOW) + #define LIL_APPLY_OUTLINE_LIT_SHADOW if(_OutlineLitShadowReceive) outlineLitFactor *= fd.attenuation; +#else + #define LIL_APPLY_OUTLINE_LIT_SHADOW +#endif + +#if defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) && defined(LIL_V2F_NDOTL) + #define LIL_APPLY_OUTLINE_COLOR \ + float3 outlineLitColor = _OutlineLitApplyTex ? fd.col.rgb * _OutlineLitColor.rgb : _OutlineLitColor.rgb; \ + float outlineLitFactor = saturate(input.NdotL * _OutlineLitScale + _OutlineLitOffset) * _OutlineLitColor.a; \ + LIL_APPLY_OUTLINE_LIT_SHADOW \ + fd.col.rgb = lerp(fd.col.rgb * _OutlineColor.rgb, outlineLitColor, outlineLitFactor); \ + fd.col.a *= _OutlineColor.a; +#else + #define LIL_APPLY_OUTLINE_COLOR fd.col *= _OutlineColor; +#endif + +#if !defined(OVERRIDE_OUTLINE_COLOR) + #define OVERRIDE_OUTLINE_COLOR \ + LIL_GET_OUTLINE_TEX \ + LIL_APPLY_OUTLINE_TONECORRECTION \ + LIL_APPLY_OUTLINE_COLOR +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Fur +#if LIL_RENDER == 1 || defined(LIL_FUR_PRE) + #if defined(LIL_ONEPASS_FUR) + #define LIL_FUR_LAYER_ALPHA \ + float furAlpha = furLayerShift < -1.5 ? 1.0 : saturate(furNoiseMask - furLayerShift * furLayerAbs * furLayerAbs * furLayerAbs + 0.25); + #else + #define LIL_FUR_LAYER_ALPHA \ + float furAlpha = saturate(furNoiseMask - furLayerShift * furLayerAbs * furLayerAbs * furLayerAbs + 0.25); + #endif + #define LIL_FUR_LAYER_AO \ + float furAO = _FurAO * saturate(1.0 - fwidth(input.furLayer)); \ + fd.col.rgb *= furLayer * furAO * 2.0 + 1.0 - furAO; +#else + #if defined(LIL_ONEPASS_FUR) + #define LIL_FUR_LAYER_ALPHA \ + float furAlpha = furLayerShift < -1.5 ? 1.0 : saturate(furNoiseMask - furLayerShift * furLayerAbs * furLayerAbs); + #else + #define LIL_FUR_LAYER_ALPHA \ + float furAlpha = saturate(furNoiseMask - furLayerShift * furLayerAbs * furLayerAbs); + #endif + #define LIL_FUR_LAYER_AO \ + fd.col.rgb *= saturate(1.0 - furNoiseMask + furNoiseMask * furLayer) * _FurAO * 1.25 + 1.0 - _FurAO; +#endif + +#if defined(LIL_ALPHA_PS) + #undef LIL_FUR_LAYER_AO + #define LIL_FUR_LAYER_AO +#endif + +#if defined(LIL_FEATURE_FurNoiseMask) + #define LIL_SAMPLE_FurNoiseMask furNoiseMask = LIL_SAMPLE_2D_ST(_FurNoiseMask, sampler_MainTex, fd.uv0).r +#else + #define LIL_SAMPLE_FurNoiseMask +#endif + +#if defined(LIL_FEATURE_FurMask) + #define LIL_SAMPLE_FurMask furAlpha *= LIL_SAMPLE_2D(_FurMask, sampler_MainTex, fd.uvMain).r +#else + #define LIL_SAMPLE_FurMask +#endif + +#if !defined(OVERRIDE_FUR) + #define OVERRIDE_FUR \ + float furLayer = input.furLayer; \ + float furLayerShift = furLayer - furLayer * _FurRootOffset + _FurRootOffset; \ + float furLayerAbs = abs(furLayerShift); \ + float furNoiseMask = 1.0; \ + LIL_SAMPLE_FurNoiseMask; \ + LIL_FUR_LAYER_ALPHA \ + LIL_SAMPLE_FurMask; \ + fd.col.a *= furAlpha; \ + LIL_FUR_LAYER_AO +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Alpha Mask +#if !defined(OVERRIDE_ALPHAMASK) + #if defined(LIL_FEATURE_AlphaMask) + #define LIL_SAMPLE_AlphaMask alphaMask = LIL_SAMPLE_2D_ST(_AlphaMask, sampler_MainTex, fd.uvMain).r + #else + #define LIL_SAMPLE_AlphaMask + #endif + + #define OVERRIDE_ALPHAMASK \ + if(_AlphaMaskMode) \ + { \ + float alphaMask = 1.0; \ + LIL_SAMPLE_AlphaMask; \ + alphaMask = saturate(alphaMask * _AlphaMaskScale + _AlphaMaskValue); \ + if(_AlphaMaskMode == 1) fd.col.a = alphaMask; \ + if(_AlphaMaskMode == 2) fd.col.a = fd.col.a * alphaMask; \ + if(_AlphaMaskMode == 3) fd.col.a = saturate(fd.col.a + alphaMask); \ + if(_AlphaMaskMode == 4) fd.col.a = saturate(fd.col.a - alphaMask); \ + } +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Dissolve +#if !defined(OVERRIDE_DISSOLVE) + #if defined(LIL_FEATURE_DissolveMask) + #define _DissolveMaskEnabled true + #else + #define _DissolveMaskEnabled false + #endif + + #if defined(LIL_FEATURE_DissolveNoiseMask) + #define OVERRIDE_DISSOLVE \ + lilCalcDissolveWithNoise( \ + fd.col.a, \ + dissolveAlpha, \ + fd.uv0, \ + fd.positionOS, \ + _DissolveParams, \ + _DissolvePos, \ + _DissolveMask, \ + _DissolveMask_ST, \ + _DissolveMaskEnabled, \ + _DissolveNoiseMask, \ + _DissolveNoiseMask_ST, \ + _DissolveNoiseMask_ScrollRotate, \ + _DissolveNoiseStrength \ + LIL_SAMP_IN(sampler_MainTex) \ + ); + #else + #define OVERRIDE_DISSOLVE \ + lilCalcDissolve( \ + fd.col.a, \ + dissolveAlpha, \ + fd.uv0, \ + fd.positionOS, \ + _DissolveParams, \ + _DissolvePos, \ + _DissolveMask, \ + _DissolveMask_ST, \ + _DissolveMaskEnabled \ + LIL_SAMP_IN(sampler_MainTex) \ + ); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Dither +#if !defined(OVERRIDE_DITHER) + #if !defined(SHADER_API_GLES) + #if defined(LIL_FEATURE_DISTANCE_FADE) && defined(LIL_PASS_SHADOWCASTER_INCLUDED) + #define OVERRIDE_DITHER \ + if(_UseDither == 1) \ + { \ + if(LIL_MATRIX_P._m33 == 0.0) lilDistanceFadeAlphaOnly(fd); \ + fd.col.a = fd.col.a >= (lilSamplePointRepeat(_DitherTex, input.positionCS.xy, _DitherTex_TexelSize.zw).r * 255 + 1) / (_DitherMaxValue+2); \ + } + #elif defined(LIL_FEATURE_DISTANCE_FADE) + #define OVERRIDE_DITHER \ + if(_UseDither == 1) \ + { \ + lilDistanceFadeAlphaOnly(fd); \ + fd.col.a = fd.col.a >= (lilSamplePointRepeat(_DitherTex, input.positionCS.xy, _DitherTex_TexelSize.zw).r * 255 + 1) / (_DitherMaxValue+2); \ + } + #else + #define OVERRIDE_DITHER \ + if(_UseDither == 1) \ + { \ + fd.col.a = fd.col.a >= (lilSamplePointRepeat(_DitherTex, input.positionCS.xy, _DitherTex_TexelSize.zw).r * 255 + 1) / (_DitherMaxValue+2); \ + } + #endif + #else + #define OVERRIDE_DITHER + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Premultiply +#if LIL_RENDER != 2 + #define LIL_PREMULTIPLY +#elif defined(LIL_PASS_FORWARDADD) && !defined(LIL_REFRACTION) + #define LIL_PREMULTIPLY fd.col.rgb *= saturate(fd.col.a * _AlphaBoostFA); +#else + #define LIL_PREMULTIPLY fd.col.rgb *= fd.col.a; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Normal +#if !defined(OVERRIDE_NORMAL_1ST) + #if defined(LIL_FEATURE_BumpMap) + #define OVERRIDE_NORMAL_1ST \ + if(_UseBumpMap) \ + { \ + float4 normalTex = LIL_SAMPLE_2D_ST(_BumpMap, sampler_MainTex, fd.uvMain); \ + normalmap = lilUnpackNormalScale(normalTex, _BumpScale); \ + } + #else + #define OVERRIDE_NORMAL_1ST + #endif +#endif + +#if !defined(OVERRIDE_NORMAL_2ND) + #if defined(LIL_FEATURE_Bump2ndScaleMask) + #define LIL_SAMPLE_Bump2ndScaleMask bump2ndScale *= LIL_SAMPLE_2D_ST(_Bump2ndScaleMask, sampler_MainTex, fd.uvMain).r + #else + #define LIL_SAMPLE_Bump2ndScaleMask + #endif + + #if defined(LIL_FEATURE_Bump2ndMap) + #define OVERRIDE_NORMAL_2ND \ + if(_UseBump2ndMap) \ + { \ + float2 uvBump2nd = fd.uv0; \ + if(_Bump2ndMap_UVMode == 1) uvBump2nd = fd.uv1; \ + if(_Bump2ndMap_UVMode == 2) uvBump2nd = fd.uv2; \ + if(_Bump2ndMap_UVMode == 3) uvBump2nd = fd.uv3; \ + float4 normal2ndTex = LIL_SAMPLE_2D_ST(_Bump2ndMap, lil_sampler_linear_repeat, uvBump2nd); \ + float bump2ndScale = _Bump2ndScale; \ + LIL_SAMPLE_Bump2ndScaleMask; \ + normalmap = lilBlendNormal(normalmap, lilUnpackNormalScale(normal2ndTex, bump2ndScale)); \ + } + #else + #define OVERRIDE_NORMAL_2ND + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Anisotropy +#if !defined(OVERRIDE_ANISOTROPY) + #if defined(LIL_FEATURE_AnisotropyTangentMap) + #define LIL_SAMPLE_AnisotropyTangentMap anisoTangentMap = LIL_SAMPLE_2D_ST(_AnisotropyTangentMap, sampler_MainTex, fd.uvMain) + #else + #define LIL_SAMPLE_AnisotropyTangentMap + #endif + + #if defined(LIL_FEATURE_AnisotropyScaleMask) + #define LIL_SAMPLE_AnisotropyScaleMask fd.anisotropy *= LIL_SAMPLE_2D_ST(_AnisotropyScaleMask, sampler_MainTex, fd.uvMain).r + #else + #define LIL_SAMPLE_AnisotropyScaleMask + #endif + + #define OVERRIDE_ANISOTROPY \ + if(_UseAnisotropy) \ + { \ + float4 anisoTangentMap = float4(0.5,0.5,1.0,0.5); \ + LIL_SAMPLE_AnisotropyTangentMap; \ + float3 anisoTangent = lilUnpackNormalScale(anisoTangentMap, 1.0); \ + fd.T = lilOrthoNormalize(normalize(mul(anisoTangent, fd.TBN)), fd.N); \ + fd.B = cross(fd.N, fd.T); \ + fd.anisotropy = _AnisotropyScale; \ + LIL_SAMPLE_AnisotropyScaleMask; \ + float3 anisoNormalWS = lilGetAnisotropyNormalWS(fd.N, fd.T, fd.B, fd.V, fd.anisotropy); \ + if(_Anisotropy2Reflection) fd.reflectionN = anisoNormalWS; \ + if(_Anisotropy2MatCap) fd.matcapN = anisoNormalWS; \ + if(_Anisotropy2MatCap2nd) fd.matcap2ndN = anisoNormalWS; \ + if(_Anisotropy2Reflection) fd.perceptualRoughness = saturate(1.2 - abs(fd.anisotropy)); \ + } +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// AudioLink +#if defined(LIL_FEATURE_AUDIOLINK) + void lilAudioLinkFrag(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseAudioLink) + { + // UV + float2 audioLinkUV; + if(_AudioLinkUVMode == 0) audioLinkUV.x = _AudioLinkUVParams.g; + if(_AudioLinkUVMode == 1) audioLinkUV.x = _AudioLinkUVParams.r - fd.nv * _AudioLinkUVParams.r + _AudioLinkUVParams.g; + if(_AudioLinkUVMode == 2) audioLinkUV.x = lilRotateUV(fd.uv0, _AudioLinkUVParams.b).x * _AudioLinkUVParams.r + _AudioLinkUVParams.g; + if(_AudioLinkUVMode == 5) audioLinkUV.x = distance(fd.positionOS, _AudioLinkStart.xyz) * _AudioLinkUVParams.r + _AudioLinkUVParams.g; + audioLinkUV.y = _AudioLinkUVParams.a; + + // Mask (R:Delay G:Band B:Strength) + // Spectrum Mask (R:Volume G:Band B:Strength) + float4 audioLinkMask = 1.0; + #if defined(LIL_FEATURE_AudioLinkMask) + if(_AudioLinkUVMode == 3 || _AudioLinkUVMode == 4) + { + float2 uvMask = fd.uvMain; + if(_AudioLinkMask_UVMode == 1) uvMask = fd.uv1; + if(_AudioLinkMask_UVMode == 2) uvMask = fd.uv2; + if(_AudioLinkMask_UVMode == 3) uvMask = fd.uv3; + uvMask = lilCalcUV(uvMask, _AudioLinkMask_ST, _AudioLinkMask_ScrollRotate); + audioLinkMask = LIL_SAMPLE_2D(_AudioLinkMask, sampler_AudioLinkMask, uvMask); + audioLinkUV = _AudioLinkUVMode == 3 ? audioLinkMask.rg : float2(frac(audioLinkMask.g * 2.0), 4.5/4.0 + floor(audioLinkMask.g * 2.0)/4.0); + } + #endif + + // Init value + if(_AudioLinkUVMode == 4) + { + float defaultY = audioLinkMask.r * 4.0 + _AudioLinkDefaultValue.w; + float defaultVal = sin(LIL_TIME * _AudioLinkDefaultValue.z - audioLinkMask.g * _AudioLinkDefaultValue.y) * _AudioLinkDefaultValue.x * _AudioLinkUVParams.x + _AudioLinkDefaultValue.x * _AudioLinkUVParams.x; + fd.audioLinkValue = _AudioLinkUVParams.w < 1.0 ? abs(defaultVal - defaultY) < _AudioLinkUVParams.w : defaultVal > defaultY; + } + else + { + fd.audioLinkValue = saturate(_AudioLinkDefaultValue.x - saturate(frac(LIL_TIME * _AudioLinkDefaultValue.z - audioLinkUV.x)+_AudioLinkDefaultValue.w) * _AudioLinkDefaultValue.y * _AudioLinkDefaultValue.x); + } + + // Local + #if defined(LIL_FEATURE_AUDIOLINK_LOCAL) && defined(LIL_FEATURE_AudioLinkMask) + if(_AudioLinkAsLocal) + { + audioLinkUV.x += frac(-LIL_TIME * _AudioLinkLocalMapParams.r / 60 * _AudioLinkLocalMapParams.g) + _AudioLinkLocalMapParams.b; + fd.audioLinkValue = LIL_SAMPLE_2D(_AudioLinkLocalMap, lil_sampler_linear_repeat, audioLinkUV).r; + } + else + #endif + + // Global + if(lilCheckAudioLink()) + { + // Scaling for _AudioTexture (4/64) + audioLinkUV.y *= 0.0625; + float4 audioTexture = LIL_SAMPLE_2D(_AudioTexture, lil_sampler_linear_clamp, audioLinkUV); + if(_AudioLinkUVMode == 4) + { + float audioVal = audioTexture.b * _AudioLinkUVParams.x * lerp(_AudioLinkUVParams.y, _AudioLinkUVParams.z, audioLinkMask.g); + fd.audioLinkValue = _AudioLinkUVParams.w < 1.0 ? abs(audioVal - audioLinkMask.r) < _AudioLinkUVParams.w : audioVal > audioLinkMask.r; + } + else + { + fd.audioLinkValue = audioTexture.r; + } + fd.audioLinkValue = saturate(fd.audioLinkValue); + } + fd.audioLinkValue *= audioLinkMask.b; + } + } +#endif + +#if !defined(OVERRIDE_AUDIOLINK) + #define OVERRIDE_AUDIOLINK \ + lilAudioLinkFrag(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// UDIM Discard +#if !defined(OVERRIDE_UDIMDISCARD) + #define OVERRIDE_UDIMDISCARD \ + if(_UDIMDiscardMode == 1 && LIL_CHECK_UDIMDISCARD(fd)) discard; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Main 2nd +#if defined(LIL_FEATURE_MAIN2ND) && !defined(LIL_LITE) + void lilGetMain2nd(inout lilFragData fd, inout float4 color2nd, inout float main2ndDissolveAlpha LIL_SAMP_IN_FUNC(samp)) + { + #if !(defined(LIL_FEATURE_DECAL) && defined(LIL_FEATURE_ANIMATE_DECAL)) + float4 _Main2ndTexDecalAnimation = 0.0; + float4 _Main2ndTexDecalSubParam = 0.0; + #endif + #if !defined(LIL_FEATURE_DECAL) + bool _Main2ndTexIsDecal = false; + bool _Main2ndTexIsLeftOnly = false; + bool _Main2ndTexIsRightOnly = false; + bool _Main2ndTexShouldCopy = false; + bool _Main2ndTexShouldFlipMirror = false; + bool _Main2ndTexShouldFlipCopy = false; + #endif + color2nd = _Color2nd; + if(_UseMain2ndTex) + { + float2 uv2nd = fd.uv0; + if(_Main2ndTex_UVMode == 1) uv2nd = fd.uv1; + if(_Main2ndTex_UVMode == 2) uv2nd = fd.uv2; + if(_Main2ndTex_UVMode == 3) uv2nd = fd.uv3; + if(_Main2ndTex_UVMode == 4) uv2nd = fd.uvMat; + #if defined(LIL_FEATURE_Main2ndTex) + color2nd *= LIL_GET_SUBTEX(_Main2ndTex, uv2nd); + #endif + #if defined(LIL_FEATURE_Main2ndBlendMask) + color2nd.a *= LIL_SAMPLE_2D(_Main2ndBlendMask, samp, fd.uvMain).r; + #endif + + #if defined(LIL_FEATURE_Main2ndDissolveMask) + #define _Main2ndDissolveMaskEnabled true + #else + #define _Main2ndDissolveMaskEnabled false + #endif + + #if defined(LIL_FEATURE_LAYER_DISSOLVE) + #if defined(LIL_FEATURE_Main2ndDissolveNoiseMask) + lilCalcDissolveWithNoise( + color2nd.a, + main2ndDissolveAlpha, + fd.uv0, + fd.positionOS, + _Main2ndDissolveParams, + _Main2ndDissolvePos, + _Main2ndDissolveMask, + _Main2ndDissolveMask_ST, + _Main2ndDissolveMaskEnabled, + _Main2ndDissolveNoiseMask, + _Main2ndDissolveNoiseMask_ST, + _Main2ndDissolveNoiseMask_ScrollRotate, + _Main2ndDissolveNoiseStrength, + samp + ); + #else + lilCalcDissolve( + color2nd.a, + main2ndDissolveAlpha, + fd.uv0, + fd.positionOS, + _Main2ndDissolveParams, + _Main2ndDissolvePos, + _Main2ndDissolveMask, + _Main2ndDissolveMask_ST, + _Main2ndDissolveMaskEnabled, + samp + ); + #endif + #endif + #if defined(LIL_FEATURE_AUDIOLINK) + if(_AudioLink2Main2nd) color2nd.a *= fd.audioLinkValue; + #endif + color2nd.a = lerp(color2nd.a, color2nd.a * saturate((fd.depth - _Main2ndDistanceFade.x) / (_Main2ndDistanceFade.y - _Main2ndDistanceFade.x)), _Main2ndDistanceFade.z); + if(_Main2ndTex_Cull == 1 && fd.facing > 0 || _Main2ndTex_Cull == 2 && fd.facing < 0) color2nd.a = 0; + #if LIL_RENDER != 0 + if(_Main2ndTexAlphaMode != 0) + { + if(_Main2ndTexAlphaMode == 1) fd.col.a = color2nd.a; + if(_Main2ndTexAlphaMode == 2) fd.col.a = fd.col.a * color2nd.a; + if(_Main2ndTexAlphaMode == 3) fd.col.a = saturate(fd.col.a + color2nd.a); + if(_Main2ndTexAlphaMode == 4) fd.col.a = saturate(fd.col.a - color2nd.a); + color2nd.a = 1; + } + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, color2nd.rgb, color2nd.a * _Main2ndEnableLighting, _Main2ndTexBlendMode); + } + } +#endif + +#if !defined(OVERRIDE_MAIN2ND) + #define OVERRIDE_MAIN2ND \ + lilGetMain2nd(fd, color2nd, main2ndDissolveAlpha LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Main 3rd +#if defined(LIL_FEATURE_MAIN3RD) && !defined(LIL_LITE) + void lilGetMain3rd(inout lilFragData fd, inout float4 color3rd, inout float main3rdDissolveAlpha LIL_SAMP_IN_FUNC(samp)) + { + #if !(defined(LIL_FEATURE_DECAL) && defined(LIL_FEATURE_ANIMATE_DECAL)) + float4 _Main3rdTexDecalAnimation = 0.0; + float4 _Main3rdTexDecalSubParam = 0.0; + #endif + #if !defined(LIL_FEATURE_DECAL) + bool _Main3rdTexIsDecal = false; + bool _Main3rdTexIsLeftOnly = false; + bool _Main3rdTexIsRightOnly = false; + bool _Main3rdTexShouldCopy = false; + bool _Main3rdTexShouldFlipMirror = false; + bool _Main3rdTexShouldFlipCopy = false; + #endif + color3rd = _Color3rd; + if(_UseMain3rdTex) + { + float2 uv3rd = fd.uv0; + if(_Main3rdTex_UVMode == 1) uv3rd = fd.uv1; + if(_Main3rdTex_UVMode == 2) uv3rd = fd.uv2; + if(_Main3rdTex_UVMode == 3) uv3rd = fd.uv3; + if(_Main3rdTex_UVMode == 4) uv3rd = fd.uvMat; + #if defined(LIL_FEATURE_Main3rdTex) + color3rd *= LIL_GET_SUBTEX(_Main3rdTex, uv3rd); + #endif + #if defined(LIL_FEATURE_Main3rdBlendMask) + color3rd.a *= LIL_SAMPLE_2D(_Main3rdBlendMask, samp, fd.uvMain).r; + #endif + + #if defined(LIL_FEATURE_Main3rdDissolveMask) + #define _Main3rdDissolveMaskEnabled true + #else + #define _Main3rdDissolveMaskEnabled false + #endif + + #if defined(LIL_FEATURE_LAYER_DISSOLVE) + #if defined(LIL_FEATURE_Main3rdDissolveNoiseMask) + lilCalcDissolveWithNoise( + color3rd.a, + main3rdDissolveAlpha, + fd.uv0, + fd.positionOS, + _Main3rdDissolveParams, + _Main3rdDissolvePos, + _Main3rdDissolveMask, + _Main3rdDissolveMask_ST, + _Main3rdDissolveMaskEnabled, + _Main3rdDissolveNoiseMask, + _Main3rdDissolveNoiseMask_ST, + _Main3rdDissolveNoiseMask_ScrollRotate, + _Main3rdDissolveNoiseStrength, + samp + ); + #else + lilCalcDissolve( + color3rd.a, + main3rdDissolveAlpha, + fd.uv0, + fd.positionOS, + _Main3rdDissolveParams, + _Main3rdDissolvePos, + _Main3rdDissolveMask, + _Main3rdDissolveMask_ST, + _Main3rdDissolveMaskEnabled, + samp + ); + #endif + #endif + #if defined(LIL_FEATURE_AUDIOLINK) + if(_AudioLink2Main3rd) color3rd.a *= fd.audioLinkValue; + #endif + color3rd.a = lerp(color3rd.a, color3rd.a * saturate((fd.depth - _Main3rdDistanceFade.x) / (_Main3rdDistanceFade.y - _Main3rdDistanceFade.x)), _Main3rdDistanceFade.z); + if(_Main3rdTex_Cull == 1 && fd.facing > 0 || _Main3rdTex_Cull == 2 && fd.facing < 0) color3rd.a = 0; + #if LIL_RENDER != 0 + if(_Main3rdTexAlphaMode != 0) + { + if(_Main3rdTexAlphaMode == 1) fd.col.a = color3rd.a; + if(_Main3rdTexAlphaMode == 2) fd.col.a = fd.col.a * color3rd.a; + if(_Main3rdTexAlphaMode == 3) fd.col.a = saturate(fd.col.a + color3rd.a); + if(_Main3rdTexAlphaMode == 4) fd.col.a = saturate(fd.col.a - color3rd.a); + color3rd.a = 1; + } + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, color3rd.rgb, color3rd.a * _Main3rdEnableLighting, _Main3rdTexBlendMode); + } + } +#endif + +#if !defined(OVERRIDE_MAIN3RD) + #define OVERRIDE_MAIN3RD \ + lilGetMain3rd(fd, color3rd, main3rdDissolveAlpha LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Shadow +#if defined(LIL_FEATURE_SHADOW) && !defined(LIL_LITE) && !defined(LIL_GEM) + void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseShadow) + { + // Normal + float3 N1 = fd.N; + float3 N2 = fd.N; + #if defined(LIL_FEATURE_SHADOW_3RD) + float3 N3 = fd.N; + #endif + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N1 = lerp(fd.origN, fd.N, _ShadowNormalStrength); + N2 = lerp(fd.origN, fd.N, _Shadow2ndNormalStrength); + #if defined(LIL_FEATURE_SHADOW_3RD) + N3 = lerp(fd.origN, fd.N, _Shadow3rdNormalStrength); + #endif + #endif + + float4 shadowStrengthMask = 1; + #if defined(LIL_FEATURE_ShadowStrengthMask) + #if defined(_ShadowStrengthMaskLOD) + shadowStrengthMask = LIL_SAMPLE_2D(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain); + if(_ShadowStrengthMaskLOD) shadowStrengthMask = LIL_SAMPLE_2D_GRAD(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowStrengthMaskLOD), max(fd.ddyMain, _ShadowStrengthMaskLOD)); + #else + shadowStrengthMask = LIL_SAMPLE_2D_GRAD(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowStrengthMaskLOD), max(fd.ddyMain, _ShadowStrengthMaskLOD)); + #endif + #endif + + // Shade + float aastrencth = _AAStrength; + float4 lns = 1.0; + lns.x = saturate(dot(fd.L,N1)*0.5+0.5); + lns.y = saturate(dot(fd.L,N2)*0.5+0.5); + #if defined(LIL_FEATURE_SHADOW_3RD) + lns.z = saturate(dot(fd.L,N3)*0.5+0.5); + #endif + if(_ShadowMaskType == 2) + { + float3 faceR = mul((float3x3)LIL_MATRIX_M, float3(-1.0,0.0,0.0)); + float LdotR = dot(fd.L.xz, faceR.xz); + float sdf = LdotR < 0 ? shadowStrengthMask.g : shadowStrengthMask.r; + + float3 faceF = mul((float3x3)LIL_MATRIX_M, float3(0.0,0.0,1.0)).xyz; + faceF.y *= _ShadowFlatBlur; + faceF = dot(faceF,faceF) == 0 ? 0 : normalize(faceF); + float3 faceL = fd.L.xyz; + faceL.y *= _ShadowFlatBlur; + faceL = dot(faceL,faceL) == 0 ? 0 : normalize(faceL); + + float lnSDF = dot(faceL,faceF); + lns = lerp(saturate(lnSDF * 0.5 + sdf * 0.5 + 0.25), lns, shadowStrengthMask.b); + aastrencth = 0; + + shadowStrengthMask.r = shadowStrengthMask.a; + } + + // Shadow + #if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW) + float calculatedShadow = saturate(fd.attenuation + distance(fd.L, fd.origL)); + lns.x *= lerp(1.0, calculatedShadow, _ShadowReceive); + lns.y *= lerp(1.0, calculatedShadow, _Shadow2ndReceive); + #if defined(LIL_FEATURE_SHADOW_3RD) + lns.z *= lerp(1.0, calculatedShadow, _Shadow3rdReceive); + #endif + #endif + + // Blur Scale + float shadowBlur = _ShadowBlur; + float shadow2ndBlur = _Shadow2ndBlur; + #if defined(LIL_FEATURE_SHADOW_3RD) + float shadow3rdBlur = _Shadow3rdBlur; + #endif + #if defined(LIL_FEATURE_ShadowBlurMask) + #if defined(_ShadowBlurMaskLOD) + float4 shadowBlurMask = LIL_SAMPLE_2D(_ShadowBlurMask, lil_sampler_linear_repeat, fd.uvMain); + if(_ShadowBlurMaskLOD) shadowBlurMask = LIL_SAMPLE_2D_GRAD(_ShadowBlurMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowBlurMaskLOD), max(fd.ddyMain, _ShadowBlurMaskLOD)); + #else + float4 shadowBlurMask = LIL_SAMPLE_2D_GRAD(_ShadowBlurMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowBlurMaskLOD), max(fd.ddyMain, _ShadowBlurMaskLOD)); + #endif + shadowBlur *= shadowBlurMask.r; + shadow2ndBlur *= shadowBlurMask.g; + #if defined(LIL_FEATURE_SHADOW_3RD) + shadow3rdBlur *= shadowBlurMask.b; + #endif + #endif + + // AO Map & Toon + #if defined(LIL_FEATURE_ShadowBorderMask) + #if defined(_ShadowBorderMaskLOD) + float4 shadowBorderMask = LIL_SAMPLE_2D(_ShadowBorderMask, lil_sampler_linear_repeat, fd.uvMain); + if(_ShadowBorderMaskLOD) shadowBorderMask = LIL_SAMPLE_2D_GRAD(_ShadowBorderMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowBorderMaskLOD), max(fd.ddyMain, _ShadowBorderMaskLOD)); + #else + float4 shadowBorderMask = LIL_SAMPLE_2D_GRAD(_ShadowBorderMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowBorderMaskLOD), max(fd.ddyMain, _ShadowBorderMaskLOD)); + #endif + shadowBorderMask.r = saturate(shadowBorderMask.r * _ShadowAOShift.x + _ShadowAOShift.y); + shadowBorderMask.g = saturate(shadowBorderMask.g * _ShadowAOShift.z + _ShadowAOShift.w); + #if defined(LIL_FEATURE_SHADOW_3RD) + shadowBorderMask.b = saturate(shadowBorderMask.b * _ShadowAOShift2.x + _ShadowAOShift2.y); + #endif + lns.xyz = _ShadowPostAO ? lns.xyz : lns.xyz * shadowBorderMask.rgb; + + lns.w = lns.x; + lns.x = lilTooningNoSaturateScale(aastrencth, lns.x, _ShadowBorder, shadowBlur); + lns.y = lilTooningNoSaturateScale(aastrencth, lns.y, _Shadow2ndBorder, shadow2ndBlur); + lns.w = lilTooningNoSaturateScale(aastrencth, lns.w, _ShadowBorder, shadowBlur, _ShadowBorderRange); + #if defined(LIL_FEATURE_SHADOW_3RD) + lns.z = lilTooningNoSaturateScale(aastrencth, lns.z, _Shadow3rdBorder, shadow3rdBlur); + #endif + lns = _ShadowPostAO ? lns * shadowBorderMask.rgbr : lns; + lns = saturate(lns); + #else + lns.w = lns.x; + lns.x = lilTooningScale(aastrencth, lns.x, _ShadowBorder, shadowBlur); + lns.y = lilTooningScale(aastrencth, lns.y, _Shadow2ndBorder, shadow2ndBlur); + lns.w = lilTooningScale(aastrencth, lns.w, _ShadowBorder, shadowBlur, _ShadowBorderRange); + #if defined(LIL_FEATURE_SHADOW_3RD) + lns.z = lilTooningScale(aastrencth, lns.z, _Shadow3rdBorder, shadow3rdBlur); + #endif + #endif + + // Force shadow on back face + float bfshadow = (fd.facing < 0.0) ? 1.0 - _BackfaceForceShadow : 1.0; + lns.x *= bfshadow; + lns.y *= bfshadow; + lns.w *= bfshadow; + #if defined(LIL_FEATURE_SHADOW_3RD) + lns.z *= bfshadow; + #endif + + // Copy + fd.shadowmix = lns.x; + // Strength + float shadowStrength = _ShadowStrength; + #ifdef LIL_COLORSPACE_GAMMA + shadowStrength = lilSRGBToLinear(shadowStrength); + #endif + if(_ShadowMaskType == 1) + { + float3 flatN = normalize(mul((float3x3)LIL_MATRIX_M, float3(0.0,0.25,1.0)));//normalize(LIL_MATRIX_M._m02_m12_m22); + float lnFlat = saturate((dot(flatN, fd.L) + _ShadowFlatBorder) / _ShadowFlatBlur); + #if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW) + lnFlat *= lerp(1.0, calculatedShadow, _ShadowReceive); + #endif + lns = lerp(lnFlat, lns, shadowStrengthMask.r); + } + else + { + shadowStrength *= shadowStrengthMask.r; + } + lns.x = lerp(1.0, lns.x, shadowStrength); + + // Shadow Colors + float4 shadowColorTex = 0.0; + float4 shadow2ndColorTex = 0.0; + float4 shadow3rdColorTex = 0.0; + #if defined(LIL_FEATURE_SHADOW_LUT) + if(_ShadowColorType == 1) + { + float4 uvShadow; + float factor; + lilCalcLUTUV(fd.albedo, 16, 1, uvShadow, factor); + #if defined(LIL_FEATURE_ShadowColorTex) + shadowColorTex = lilSampleLUT(uvShadow, factor, _ShadowColorTex); + #endif + #if defined(LIL_FEATURE_Shadow2ndColorTex) + shadow2ndColorTex = lilSampleLUT(uvShadow, factor, _Shadow2ndColorTex); + #endif + #if defined(LIL_FEATURE_SHADOW_3RD) && defined(LIL_FEATURE_Shadow3rdColorTex) + shadow3rdColorTex = lilSampleLUT(uvShadow, factor, _Shadow3rdColorTex); + #endif + } + else + #endif + { + #if defined(LIL_FEATURE_ShadowColorTex) + shadowColorTex = LIL_SAMPLE_2D(_ShadowColorTex, samp, fd.uvMain); + #endif + #if defined(LIL_FEATURE_Shadow2ndColorTex) + shadow2ndColorTex = LIL_SAMPLE_2D(_Shadow2ndColorTex, samp, fd.uvMain); + #endif + #if defined(LIL_FEATURE_SHADOW_3RD) && defined(LIL_FEATURE_Shadow3rdColorTex) + shadow3rdColorTex = LIL_SAMPLE_2D(_Shadow3rdColorTex, samp, fd.uvMain); + #endif + } + + // Shadow Color 1 + float3 indirectCol = lerp(fd.albedo, shadowColorTex.rgb, shadowColorTex.a) * _ShadowColor.rgb; + + // Shadow Color 2 + shadow2ndColorTex.rgb = lerp(fd.albedo, shadow2ndColorTex.rgb, shadow2ndColorTex.a) * _Shadow2ndColor.rgb; + lns.y = _Shadow2ndColor.a - lns.y * _Shadow2ndColor.a; + indirectCol = lerp(indirectCol, shadow2ndColorTex.rgb, lns.y); + + #if defined(LIL_FEATURE_SHADOW_3RD) + // Shadow Color 3 + shadow3rdColorTex.rgb = lerp(fd.albedo, shadow3rdColorTex.rgb, shadow3rdColorTex.a) * _Shadow3rdColor.rgb; + lns.z = _Shadow3rdColor.a - lns.z * _Shadow3rdColor.a; + indirectCol = lerp(indirectCol, shadow3rdColorTex.rgb, lns.z); + #endif + + // Multiply Main Color + indirectCol = lerp(indirectCol, indirectCol*fd.albedo, _ShadowMainStrength); + + // Apply Light + float3 directCol = fd.albedo * fd.lightColor; + indirectCol = indirectCol * fd.lightColor; + + #if !defined(LIL_PASS_FORWARDADD) + // Environment Light + indirectCol = lerp(indirectCol, fd.albedo, fd.indLightColor); + #endif + // Fix + indirectCol = min(indirectCol, directCol); + // Gradation + indirectCol = lerp(indirectCol, directCol, lns.w * _ShadowBorderColor.rgb); + + // Mix + fd.col.rgb = lerp(indirectCol, directCol, lns.x); + } + else + { + fd.col.rgb *= fd.lightColor; + } + } +#elif defined(LIL_LITE) + void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseShadow) + { + // Shade + float ln1 = saturate(fd.ln*0.5+0.5); + float ln2 = ln1; + float lnB = ln1; + + // Toon + ln1 = lilTooningScale(_AAStrength, ln1, _ShadowBorder, _ShadowBlur); + ln2 = lilTooningScale(_AAStrength, ln2, _Shadow2ndBorder, _Shadow2ndBlur); + lnB = lilTooningScale(_AAStrength, lnB, _ShadowBorder, _ShadowBlur, _ShadowBorderRange); + + // Force shadow on back face + float bfshadow = (fd.facing < 0.0) ? 1.0 - _BackfaceForceShadow : 1.0; + ln1 *= bfshadow; + ln2 *= bfshadow; + lnB *= bfshadow; + + // Copy + fd.shadowmix = ln1; + + // Shadow Color 1 + float4 shadowColorTex = LIL_SAMPLE_2D(_ShadowColorTex, samp, fd.uvMain); + float3 indirectCol = lerp(fd.albedo, shadowColorTex.rgb, shadowColorTex.a); + // Shadow Color 2 + float4 shadow2ndColorTex = LIL_SAMPLE_2D(_Shadow2ndColorTex, samp, fd.uvMain); + indirectCol = lerp(indirectCol, shadow2ndColorTex.rgb, shadow2ndColorTex.a - ln2 * shadow2ndColorTex.a); + + // Apply Light + float3 directCol = fd.albedo * fd.lightColor; + indirectCol = indirectCol * fd.lightColor; + + // Environment Light + indirectCol = lerp(indirectCol, fd.albedo, fd.indLightColor); + // Fix + indirectCol = min(indirectCol, directCol); + // Gradation + indirectCol = lerp(indirectCol, directCol, lnB * _ShadowBorderColor.rgb); + + // Mix + fd.col.rgb = lerp(indirectCol, directCol, ln1); + } + else + { + fd.col.rgb *= fd.lightColor; + } + } +#endif + +#if !defined(OVERRIDE_SHADOW) + #define OVERRIDE_SHADOW \ + lilGetShading(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Rim Shade +#if defined(LIL_FEATURE_RIMSHADE) + void lilGetRimShade(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseRimShade) + { + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _RimShadeNormalStrength); + #endif + float nvabs = abs(dot(N,fd.headV)); + float rim = pow(saturate(1.0 - nvabs), _RimShadeFresnelPower); + rim = lilTooningScale(_AAStrength, rim, _RimShadeBorder, _RimShadeBlur); + rim *= _RimShadeColor.a; + #if defined(LIL_FEATURE_RimShadeMask) + rim *= LIL_SAMPLE_2D(_RimShadeMask, samp, fd.uvMain).r; + #endif + fd.col.rgb = lerp(fd.col.rgb, fd.col.rgb * _RimShadeColor.rgb, rim); + } + } +#endif + +#if !defined(OVERRIDE_RIMSHADE) + #if defined(LIL_LITE) + #define OVERRIDE_RIMSHADE \ + lilGetRimShade(fd); + #else + #define OVERRIDE_RIMSHADE \ + lilGetRimShade(fd LIL_SAMP_IN(sampler_MainTex)); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Backlight +#if defined(LIL_FEATURE_BACKLIGHT) && !defined(LIL_LITE) && !defined(LIL_GEM) + void lilBacklight(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseBacklight) + { + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _BacklightNormalStrength); + #endif + + // Color + float3 backlightColor = _BacklightColor.rgb; + #if defined(LIL_FEATURE_BacklightColorTex) + backlightColor *= LIL_SAMPLE_2D_ST(_BacklightColorTex, samp, fd.uvMain).rgb; + #endif + + // Factor + float backlightFactor = pow(saturate(-fd.hl * 0.5 + 0.5), _BacklightDirectivity); + float backlightLN = dot(normalize(-fd.headV * _BacklightViewStrength + fd.L), N) * 0.5 + 0.5; + #if defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK) + if(_BacklightReceiveShadow) backlightLN *= saturate(fd.attenuation + distance(fd.L, fd.origL)); + #endif + backlightLN = lilTooningScale(_AAStrength, backlightLN, _BacklightBorder, _BacklightBlur); + float backlight = saturate(backlightFactor * backlightLN); + backlight = fd.facing < (_BacklightBackfaceMask-1.0) ? 0.0 : backlight; + + // Blend + backlightColor = lerp(backlightColor, backlightColor * fd.albedo, _BacklightMainStrength); + fd.col.rgb += backlight * backlightColor * fd.lightColor; + } + } +#endif + +#if !defined(OVERRIDE_BACKLIGHT) + #define OVERRIDE_BACKLIGHT lilBacklight(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Refraction +#if defined(LIL_REFRACTION) && !defined(LIL_LITE) + void lilRefraction(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + float2 refractUV = fd.uvScn + (pow(1.0 - fd.nv, _RefractionFresnelPower) * _RefractionStrength) * mul((float3x3)LIL_MATRIX_V, fd.N).xy; + #if defined(LIL_REFRACTION_BLUR2) + #if defined(LIL_BRP) + float3 refractCol = 0; + float sum = 0; + float blurOffset = fd.perceptualRoughness / sqrt(fd.positionSS.w) * (0.03 / LIL_REFRACTION_SAMPNUM) * LIL_MATRIX_P._m11; + for(int j = -16; j <= 16; j++) + { + refractCol += LIL_GET_GRAB_TEX(refractUV + float2(0,j*blurOffset), 0).rgb * LIL_REFRACTION_GAUSDIST(j); + sum += LIL_REFRACTION_GAUSDIST(j); + } + refractCol /= sum; + refractCol *= _RefractionColor.rgb; + #else + float refractLod = min(sqrt(fd.perceptualRoughness / sqrt(fd.positionSS.w) * 5.0), 10); + float3 refractCol = LIL_GET_GRAB_TEX(refractUV, refractLod).rgb * _RefractionColor.rgb; + #endif + #else + float3 refractCol = LIL_GET_BG_TEX(refractUV,0).rgb * _RefractionColor.rgb; + #endif + if(_RefractionColorFromMain) refractCol *= fd.albedo; + fd.col.rgb = lerp(refractCol, fd.col.rgb, fd.col.a); + } +#endif + +#if !defined(OVERRIDE_REFRACTION) + #define OVERRIDE_REFRACTION \ + lilRefraction(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Reflection +#if defined(LIL_HDRP) + #define LIL_HDRP_POSITION_INPUT_VAR , posInput + #define LIL_HDRP_POSITION_INPUT_ARGS , PositionInputs posInput +#else + #define LIL_HDRP_POSITION_INPUT_VAR + #define LIL_HDRP_POSITION_INPUT_ARGS +#endif +#if defined(LIL_FEATURE_REFLECTION) && defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) && !defined(LIL_LITE) + float3 lilCalcSpecular(inout lilFragData fd, float3 L, float3 specular, float attenuation LIL_SAMP_IN_FUNC(samp)) + { + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _SpecularNormalStrength); + #endif + + // Half direction + float3 H = normalize(fd.V + L); + float nh = saturate(dot(N, H)); + + // Toon + #if defined(LIL_FEATURE_ANISOTROPY) + bool isAnisotropy = _UseAnisotropy && _Anisotropy2Reflection; + if(_SpecularToon & !isAnisotropy) + #else + if(_SpecularToon) + #endif + return lilTooningScale(_AAStrength, pow(nh,1.0/fd.roughness), _SpecularBorder, _SpecularBlur); + + // Dot + float nv = saturate(dot(N, fd.V)); + float nl = saturate(dot(N, L)); + float lh = saturate(dot(L, H)); + + // GGX + float ggx, sjggx = 0.0; + float lambdaV = 0.0; + float lambdaL = 0.0; + float d = 1.0; + #if defined(LIL_FEATURE_ANISOTROPY) + if(isAnisotropy) + { + + float roughnessT = max(fd.roughness * (1.0 + fd.anisotropy), 0.002); + float roughnessB = max(fd.roughness * (1.0 - fd.anisotropy), 0.002); + + float tv = dot(fd.T, fd.V); + float bv = dot(fd.B, fd.V); + float tl = dot(fd.T, L); + float bl = dot(fd.B, L); + + lambdaV = nl * length(float3(roughnessT * tv, roughnessB * bv, nv)); + lambdaL = nv * length(float3(roughnessT * tl, roughnessB * bl, nl)); + + float roughnessT1 = roughnessT * _AnisotropyTangentWidth; + float roughnessB1 = roughnessB * _AnisotropyBitangentWidth; + float roughnessT2 = roughnessT * _Anisotropy2ndTangentWidth; + float roughnessB2 = roughnessB * _Anisotropy2ndBitangentWidth; + + float anisotropyShiftNoise = 0.5; + #if defined(LIL_FEATURE_AnisotropyShiftNoiseMask) + anisotropyShiftNoise = LIL_SAMPLE_2D_ST(_AnisotropyShiftNoiseMask, samp, fd.uvMain).r - 0.5; + #endif + float anisotropyShift = anisotropyShiftNoise * _AnisotropyShiftNoiseScale + _AnisotropyShift; + float anisotropy2ndShift = anisotropyShiftNoise * _Anisotropy2ndShiftNoiseScale + _Anisotropy2ndShift; + float3 T1 = normalize(fd.T - N * anisotropyShift); + float3 B1 = normalize(fd.B - N * anisotropyShift); + float3 T2 = normalize(fd.T - N * anisotropy2ndShift); + float3 B2 = normalize(fd.B - N * anisotropy2ndShift); + + float th1 = dot(T1, H); + float bh1 = dot(B1, H); + float th2 = dot(T2, H); + float bh2 = dot(B2, H); + + float r1 = roughnessT1 * roughnessB1; + float r2 = roughnessT2 * roughnessB2; + float3 v1 = float3(th1 * roughnessB1, bh1 * roughnessT1, nh * r1); + float3 v2 = float3(th2 * roughnessB2, bh2 * roughnessT2, nh * r2); + float w1 = r1 / dot(v1, v1); + float w2 = r2 / dot(v2, v2); + ggx = r1 * w1 * w1 * _AnisotropySpecularStrength + r2 * w2 * w2 * _Anisotropy2ndSpecularStrength; + } + else + #endif + { + float roughness2 = max(fd.roughness, 0.002); + lambdaV = nl * (nv * (1.0 - roughness2) + roughness2); + lambdaL = nv * (nl * (1.0 - roughness2) + roughness2); + + float r2 = roughness2 * roughness2; + d = (nh * r2 - nh) * nh + 1.0; + ggx = r2 / (d * d + 1e-7f); + } + + #if defined(SHADER_API_MOBILE) || defined(SHADER_API_SWITCH) + sjggx = 0.5 / (lambdaV + lambdaL + 1e-4f); + #else + sjggx = 0.5 / (lambdaV + lambdaL + 1e-5f); + #endif + + float specularTerm = sjggx * ggx; + #ifdef LIL_COLORSPACE_GAMMA + specularTerm = sqrt(max(1e-4h, specularTerm)); + #endif + specularTerm *= nl * attenuation; + + // Output + #if defined(LIL_FEATURE_ANISOTROPY) + if(_SpecularToon) return lilTooningScale(_AAStrength, specularTerm, 0.5); + #endif + return specularTerm * lilFresnelTerm(specular, lh); + } + + void lilReflection(inout lilFragData fd LIL_SAMP_IN_FUNC(samp) LIL_HDRP_POSITION_INPUT_ARGS) + { + #if defined(LIL_PASS_FORWARDADD) + if(_UseReflection && _ApplySpecular && _ApplySpecularFA) + #else + if(_UseReflection) + #endif + { + float3 reflectCol = 0; + // Smoothness + #if !defined(LIL_REFRACTION_BLUR2) || defined(LIL_PASS_FORWARDADD) + fd.smoothness = _Smoothness; + #if defined(LIL_FEATURE_SmoothnessTex) + fd.smoothness *= LIL_SAMPLE_2D_ST(_SmoothnessTex, samp, fd.uvMain).r; + #endif + GSAAForSmoothness(fd.smoothness, fd.N, _GSAAStrength); + fd.perceptualRoughness = fd.perceptualRoughness - fd.smoothness * fd.perceptualRoughness; + fd.roughness = fd.perceptualRoughness * fd.perceptualRoughness; + #endif + // Metallic + float metallic = _Metallic; + #if defined(LIL_FEATURE_MetallicGlossMap) + metallic *= LIL_SAMPLE_2D_ST(_MetallicGlossMap, samp, fd.uvMain).r; + #endif + fd.col.rgb = fd.col.rgb - metallic * fd.col.rgb; + float3 specular = lerp(_Reflectance, fd.albedo, metallic); + // Color + float4 reflectionColor = _ReflectionColor; + #if defined(LIL_FEATURE_ReflectionColorTex) + reflectionColor *= LIL_SAMPLE_2D_ST(_ReflectionColorTex, samp, fd.uvMain); + #endif + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + if(_ReflectionApplyTransparency) reflectionColor.a *= fd.col.a; + #endif + // Specular + #if !defined(LIL_PASS_FORWARDADD) + if(_ApplySpecular) + #endif + { + #if 1 + float3 lightDirectionSpc = fd.L; + float3 lightColorSpc = fd.lightColor; + #else + float3 lightDirectionSpc = lilGetLightDirection(fd.positionWS); + float3 lightColorSpc = LIL_MAINLIGHT_COLOR; + #endif + #if defined(LIL_PASS_FORWARDADD) + reflectCol = lilCalcSpecular(fd, lightDirectionSpc, specular, fd.shadowmix * fd.attenuation LIL_SAMP_IN(samp)); + #elif defined(SHADOWS_SCREEN) + reflectCol = lilCalcSpecular(fd, lightDirectionSpc, specular, fd.shadowmix LIL_SAMP_IN(samp)); + #else + reflectCol = lilCalcSpecular(fd, lightDirectionSpc, specular, 1.0 LIL_SAMP_IN(samp)); + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, reflectionColor.rgb * lightColorSpc, reflectCol * reflectionColor.a, _ReflectionBlendMode); + } + // Reflection + #if !defined(LIL_PASS_FORWARDADD) + if(_ApplyReflection) + { + float3 N = fd.reflectionN; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.reflectionN, _ReflectionNormalStrength); + #endif + + float3 envReflectionColor = LIL_GET_ENVIRONMENT_REFLECTION(fd.V, N, fd.perceptualRoughness, fd.positionWS); + + float oneMinusReflectivity = LIL_DIELECTRIC_SPECULAR.a - metallic * LIL_DIELECTRIC_SPECULAR.a; + float grazingTerm = saturate(fd.smoothness + (1.0-oneMinusReflectivity)); + #ifdef LIL_COLORSPACE_GAMMA + float surfaceReduction = 1.0 - 0.28 * fd.roughness * fd.perceptualRoughness; + #else + float surfaceReduction = 1.0 / (fd.roughness * fd.roughness + 1.0); + #endif + + #ifdef LIL_REFRACTION + fd.col.rgb = lerp(envReflectionColor, fd.col.rgb, fd.col.a+(1.0-fd.col.a)*pow(fd.nvabs,abs(_RefractionStrength)*0.5+0.25)); + reflectCol = fd.col.a * surfaceReduction * envReflectionColor * lilFresnelLerp(specular, grazingTerm, fd.nv); + fd.col.a = 1.0; + #else + reflectCol = surfaceReduction * envReflectionColor * lilFresnelLerp(specular, grazingTerm, fd.nv); + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, reflectionColor.rgb, reflectCol * reflectionColor.a, _ReflectionBlendMode); + } + #endif + } + } +#endif + +#if !defined(OVERRIDE_REFLECTION) + #define OVERRIDE_REFLECTION \ + lilReflection(fd LIL_SAMP_IN(sampler_MainTex) LIL_HDRP_POSITION_INPUT_VAR); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// MatCap +#if defined(LIL_FEATURE_MATCAP) && !defined(LIL_LITE) + void lilGetMatCap(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseMatCap) + { + // Normal + float3 N = fd.matcapN; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.matcapN, _MatCapNormalStrength); + #endif + #if defined(LIL_FEATURE_MatCapBumpMap) + if(_MatCapCustomNormal) + { + float4 normalTex = LIL_SAMPLE_2D_ST(_MatCapBumpMap, samp, fd.uvMain); + float3 normalmap = lilUnpackNormalScale(normalTex, _MatCapBumpScale); + N = normalize(mul(normalmap, fd.TBN)); + N = fd.facing < (_FlipNormal-1.0) ? -N : N; + } + #endif + + // UV + float2 matUV = lilCalcMatCapUV(fd.uv1, normalize(N), fd.V, fd.headV, _MatCapTex_ST, _MatCapBlendUV1.xy, _MatCapZRotCancel, _MatCapPerspective, _MatCapVRParallaxStrength); + + // Color + float4 matCapColor = _MatCapColor; + #if defined(LIL_FEATURE_MatCapTex) + matCapColor *= LIL_SAMPLE_2D_LOD(_MatCapTex, lil_sampler_linear_repeat, matUV, _MatCapLod); + #endif + #if !defined(LIL_PASS_FORWARDADD) + matCapColor.rgb = lerp(matCapColor.rgb, matCapColor.rgb * fd.lightColor, _MatCapEnableLighting); + matCapColor.a = lerp(matCapColor.a, matCapColor.a * fd.shadowmix, _MatCapShadowMask); + #else + if(_MatCapBlendMode < 3) matCapColor.rgb *= fd.lightColor * _MatCapEnableLighting; + matCapColor.a = lerp(matCapColor.a, matCapColor.a * fd.shadowmix, _MatCapShadowMask); + #endif + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + if(_MatCapApplyTransparency) matCapColor.a *= fd.col.a; + #endif + matCapColor.a = fd.facing < (_MatCapBackfaceMask-1.0) ? 0.0 : matCapColor.a; + float3 matCapMask = 1.0; + #if defined(LIL_FEATURE_MatCapBlendMask) + matCapMask = LIL_SAMPLE_2D_ST(_MatCapBlendMask, samp, fd.uvMain).rgb; + #endif + + // Blend + matCapColor.rgb = lerp(matCapColor.rgb, matCapColor.rgb * fd.albedo, _MatCapMainStrength); + fd.col.rgb = lilBlendColor(fd.col.rgb, matCapColor.rgb, _MatCapBlend * matCapColor.a * matCapMask, _MatCapBlendMode); + } + } +#elif defined(LIL_LITE) + void lilGetMatCap(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseMatCap) + { + float3 matcap = 1.0; + matcap = LIL_SAMPLE_2D(_MatCapTex, samp, fd.uvMat).rgb; + fd.col.rgb = lerp(fd.col.rgb, _MatCapMul ? fd.col.rgb * matcap : fd.col.rgb + matcap, fd.triMask.r); + } + } +#endif + +#if !defined(OVERRIDE_MATCAP) + #define OVERRIDE_MATCAP \ + lilGetMatCap(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// MatCap 2nd +#if defined(LIL_FEATURE_MATCAP_2ND) && !defined(LIL_LITE) + void lilGetMatCap2nd(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseMatCap2nd) + { + // Normal + float3 N = fd.matcap2ndN; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.matcap2ndN, _MatCap2ndNormalStrength); + #endif + #if defined(LIL_FEATURE_MatCap2ndBumpMap) + if(_MatCap2ndCustomNormal) + { + float4 normalTex = LIL_SAMPLE_2D_ST(_MatCap2ndBumpMap, samp, fd.uvMain); + float3 normalmap = lilUnpackNormalScale(normalTex, _MatCap2ndBumpScale); + N = normalize(mul(normalmap, fd.TBN)); + N = fd.facing < (_FlipNormal-1.0) ? -N : N; + } + #endif + + // UV + float2 mat2ndUV = lilCalcMatCapUV(fd.uv1, N, fd.V, fd.headV, _MatCap2ndTex_ST, _MatCap2ndBlendUV1.xy, _MatCap2ndZRotCancel, _MatCap2ndPerspective, _MatCap2ndVRParallaxStrength); + + // Color + float4 matCap2ndColor = _MatCap2ndColor; + #if defined(LIL_FEATURE_MatCap2ndTex) + matCap2ndColor *= LIL_SAMPLE_2D_LOD(_MatCap2ndTex, lil_sampler_linear_repeat, mat2ndUV, _MatCap2ndLod); + #endif + #if !defined(LIL_PASS_FORWARDADD) + matCap2ndColor.rgb = lerp(matCap2ndColor.rgb, matCap2ndColor.rgb * fd.lightColor, _MatCap2ndEnableLighting); + matCap2ndColor.a = lerp(matCap2ndColor.a, matCap2ndColor.a * fd.shadowmix, _MatCap2ndShadowMask); + #else + if(_MatCap2ndBlendMode < 3) matCap2ndColor.rgb *= fd.lightColor * _MatCap2ndEnableLighting; + matCap2ndColor.a = lerp(matCap2ndColor.a, matCap2ndColor.a * fd.shadowmix, _MatCap2ndShadowMask); + #endif + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + if(_MatCap2ndApplyTransparency) matCap2ndColor.a *= fd.col.a; + #endif + matCap2ndColor.a = fd.facing < (_MatCap2ndBackfaceMask-1.0) ? 0.0 : matCap2ndColor.a; + float3 matCapMask = 1.0; + #if defined(LIL_FEATURE_MatCap2ndBlendMask) + matCapMask = LIL_SAMPLE_2D_ST(_MatCap2ndBlendMask, samp, fd.uvMain).rgb; + #endif + + // Blend + matCap2ndColor.rgb = lerp(matCap2ndColor.rgb, matCap2ndColor.rgb * fd.albedo, _MatCap2ndMainStrength); + fd.col.rgb = lilBlendColor(fd.col.rgb, matCap2ndColor.rgb, _MatCap2ndBlend * matCap2ndColor.a * matCapMask, _MatCap2ndBlendMode); + } + } +#endif + +#if !defined(OVERRIDE_MATCAP_2ND) + #define OVERRIDE_MATCAP_2ND \ + lilGetMatCap2nd(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Rim Light +#if defined(LIL_FEATURE_RIMLIGHT) && !defined(LIL_LITE) + void lilGetRim(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseRim) + { + #if defined(LIL_FEATURE_RIMLIGHT_DIRECTION) + // Color + float4 rimColor = _RimColor; + float4 rimIndirColor = _RimIndirColor; + #if defined(LIL_FEATURE_RimColorTex) + float4 rimColorTex = LIL_SAMPLE_2D_ST(_RimColorTex, samp, fd.uvMain); + rimColor *= rimColorTex; + rimIndirColor *= rimColorTex; + #endif + rimColor.rgb = lerp(rimColor.rgb, rimColor.rgb * fd.albedo, _RimMainStrength); + + // View direction + float3 V = lilBlendVRParallax(fd.headV, fd.V, _RimVRParallaxStrength); + + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _RimNormalStrength); + #endif + float nvabs = abs(dot(N,V)); + + // Factor + float lnRaw = dot(fd.L, N) * 0.5 + 0.5; + float lnDir = saturate((lnRaw + _RimDirRange) / (1.0 + _RimDirRange)); + float lnIndir = saturate((1.0-lnRaw + _RimIndirRange) / (1.0 + _RimIndirRange)); + float rim = pow(saturate(1.0 - nvabs), _RimFresnelPower); + rim = fd.facing < (_RimBackfaceMask-1.0) ? 0.0 : rim; + float rimDir = lerp(rim, rim*lnDir, _RimDirStrength); + float rimIndir = rim * lnIndir * _RimDirStrength; + + rimDir = lilTooningScale(_AAStrength, rimDir, _RimBorder, _RimBlur); + rimIndir = lilTooningScale(_AAStrength, rimIndir, _RimIndirBorder, _RimIndirBlur); + + rimDir = lerp(rimDir, rimDir * fd.shadowmix, _RimShadowMask); + rimIndir = lerp(rimIndir, rimIndir * fd.shadowmix, _RimShadowMask); + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + if(_RimApplyTransparency) + { + rimDir *= fd.col.a; + rimIndir *= fd.col.a; + } + #endif + + // Blend + #if !defined(LIL_PASS_FORWARDADD) + float3 rimLightMul = 1 - _RimEnableLighting + fd.lightColor * _RimEnableLighting; + #else + float3 rimLightMul = _RimBlendMode < 3 ? fd.lightColor * _RimEnableLighting : 1; + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, rimColor.rgb * rimLightMul, rimDir * rimColor.a, _RimBlendMode); + fd.col.rgb = lilBlendColor(fd.col.rgb, rimIndirColor.rgb * rimLightMul, rimIndir * rimIndirColor.a, _RimBlendMode); + #else + // Color + float4 rimColor = _RimColor; + #if defined(LIL_FEATURE_RimColorTex) + rimColor *= LIL_SAMPLE_2D_ST(_RimColorTex, samp, fd.uvMain); + #endif + rimColor.rgb = lerp(rimColor.rgb, rimColor.rgb * fd.albedo, _RimMainStrength); + + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _RimNormalStrength); + #endif + float nvabs = abs(dot(N,fd.V)); + + // Factor + float rim = pow(saturate(1.0 - nvabs), _RimFresnelPower); + rim = fd.facing < (_RimBackfaceMask-1.0) ? 0.0 : rim; + rim = lilTooningScale(_AAStrength, rim, _RimBorder, _RimBlur); + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + if(_RimApplyTransparency) rim *= fd.col.a; + #endif + rim = lerp(rim, rim * fd.shadowmix, _RimShadowMask); + + // Blend + #if !defined(LIL_PASS_FORWARDADD) + rimColor.rgb = lerp(rimColor.rgb, rimColor.rgb * fd.lightColor, _RimEnableLighting); + #else + if(_RimBlendMode < 3) rimColor.rgb *= fd.lightColor * _RimEnableLighting; + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, rimColor.rgb, rim * rimColor.a, _RimBlendMode); + #endif + } + } +#elif defined(LIL_LITE) + void lilGetRim(inout lilFragData fd) + { + if(_UseRim) + { + float rim = pow(saturate(1.0 - fd.nvabs), _RimFresnelPower); + rim = lilTooningScale(_AAStrength, rim, _RimBorder, _RimBlur); + rim = lerp(rim, rim * fd.shadowmix, _RimShadowMask); + fd.col.rgb += rim * fd.triMask.g * _RimColor.rgb * fd.lightColor; + } + } +#endif + +#if !defined(OVERRIDE_RIMLIGHT) + #if defined(LIL_LITE) + #define OVERRIDE_RIMLIGHT \ + lilGetRim(fd); + #else + #define OVERRIDE_RIMLIGHT \ + lilGetRim(fd LIL_SAMP_IN(sampler_MainTex)); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Glitter +#if defined(LIL_FEATURE_GLITTER) && !defined(LIL_LITE) + void lilGlitter(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseGlitter) + { + // View direction + float3 glitterViewDirection = lilBlendVRParallax(fd.headV, fd.V, _GlitterVRParallaxStrength); + float3 glitterCameraDirection = lerp(fd.cameraFront, fd.V, _GlitterVRParallaxStrength); + + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _GlitterNormalStrength); + #endif + + // Color + float4 glitterColor = _GlitterColor; + #if defined(LIL_FEATURE_GlitterColorTex) + float2 uvGlitterColor = fd.uvMain; //fd.uv0; + if(_GlitterColorTex_UVMode == 1) uvGlitterColor = fd.uv1; + if(_GlitterColorTex_UVMode == 2) uvGlitterColor = fd.uv2; + if(_GlitterColorTex_UVMode == 3) uvGlitterColor = fd.uv3; + glitterColor *= LIL_SAMPLE_2D_ST(_GlitterColorTex, samp, uvGlitterColor); + #endif + float2 glitterPos = _GlitterUVMode ? fd.uv1 : fd.uv0; + #if defined(LIL_FEATURE_GlitterShapeTex) + glitterColor.rgb *= lilCalcGlitter(glitterPos, N, glitterViewDirection, glitterCameraDirection, fd.L, _GlitterParams1, _GlitterParams2, _GlitterPostContrast, _GlitterSensitivity, _GlitterScaleRandomize, _GlitterAngleRandomize, _GlitterApplyShape, _GlitterShapeTex, _GlitterShapeTex_ST, _GlitterAtras); + #else + glitterColor.rgb *= lilCalcGlitter(glitterPos, N, glitterViewDirection, glitterCameraDirection, fd.L, _GlitterParams1, _GlitterParams2, _GlitterPostContrast, _GlitterSensitivity, _GlitterScaleRandomize, 0, false, _GlitterShapeTex, float4(0,0,0,0), float4(1,1,0,0)); + #endif + glitterColor.rgb = lerp(glitterColor.rgb, glitterColor.rgb * fd.albedo, _GlitterMainStrength); + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + if(_GlitterApplyTransparency) glitterColor.a *= fd.col.a; + #endif + glitterColor.a = fd.facing < (_GlitterBackfaceMask-1.0) ? 0.0 : glitterColor.a; + + // Blend + #if !defined(LIL_PASS_FORWARDADD) + glitterColor.a = lerp(glitterColor.a, glitterColor.a * fd.shadowmix, _GlitterShadowMask); + glitterColor.rgb = lerp(glitterColor.rgb, glitterColor.rgb * fd.lightColor, _GlitterEnableLighting); + fd.col.rgb += glitterColor.rgb * glitterColor.a; + #else + glitterColor.a = lerp(glitterColor.a, glitterColor.a * fd.shadowmix, _GlitterShadowMask); + fd.col.rgb += glitterColor.a * _GlitterEnableLighting * glitterColor.rgb * fd.lightColor; + #endif + } + } +#endif + +#if !defined(OVERRIDE_GLITTER) + #define OVERRIDE_GLITTER \ + lilGlitter(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + + +//------------------------------------------------------------------------------------------------------------------------------ +// Emission +#if defined(LIL_FEATURE_EMISSION_1ST) && !defined(LIL_LITE) + void lilEmission(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseEmission) + { + float4 emissionColor = _EmissionColor; + // UV + float2 emissionUV = fd.uv0; + if(_EmissionMap_UVMode == 1) emissionUV = fd.uv1; + if(_EmissionMap_UVMode == 2) emissionUV = fd.uv2; + if(_EmissionMap_UVMode == 3) emissionUV = fd.uv3; + if(_EmissionMap_UVMode == 4) emissionUV = fd.uvRim; + //if(_EmissionMap_UVMode == 4) emissionUV = fd.uvPanorama; + float2 _EmissionMapParaTex = emissionUV + _EmissionParallaxDepth * fd.parallaxOffset; + // Texture + #if defined(LIL_FEATURE_EmissionMap) + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + emissionColor *= LIL_GET_EMITEX(_EmissionMap, _EmissionMapParaTex); + #else + emissionColor *= LIL_SAMPLE_2D_ST(_EmissionMap, sampler_EmissionMap, _EmissionMapParaTex); + #endif + #endif + // Mask + #if defined(LIL_FEATURE_EmissionBlendMask) + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + emissionColor *= LIL_GET_EMIMASK(_EmissionBlendMask, fd.uv0); + #else + emissionColor *= LIL_SAMPLE_2D_ST(_EmissionBlendMask, samp, fd.uvMain); + #endif + #endif + // Gradation + #if defined(LIL_FEATURE_EmissionGradTex) + #if defined(LIL_FEATURE_EMISSION_GRADATION) && defined(LIL_FEATURE_AUDIOLINK) + if(_EmissionUseGrad) + { + float gradUV = _EmissionGradSpeed * LIL_TIME + fd.audioLinkValue * _AudioLink2EmissionGrad; + emissionColor *= LIL_SAMPLE_1D_LOD(_EmissionGradTex, lil_sampler_linear_repeat, gradUV, 0); + } + #elif defined(LIL_FEATURE_EMISSION_GRADATION) + if(_EmissionUseGrad) emissionColor *= LIL_SAMPLE_1D(_EmissionGradTex, lil_sampler_linear_repeat, _EmissionGradSpeed * LIL_TIME); + #endif + #endif + #if defined(LIL_FEATURE_AUDIOLINK) + if(_AudioLink2Emission) emissionColor.a *= fd.audioLinkValue; + #endif + emissionColor.rgb = lerp(emissionColor.rgb, emissionColor.rgb * fd.invLighting, _EmissionFluorescence); + emissionColor.rgb = lerp(emissionColor.rgb, emissionColor.rgb * fd.albedo, _EmissionMainStrength); + float emissionBlend = _EmissionBlend * lilCalcBlink(_EmissionBlink) * emissionColor.a; + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + emissionBlend *= fd.col.a; + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, emissionColor.rgb, emissionBlend, _EmissionBlendMode); + } + } +#elif defined(LIL_LITE) + void lilEmission(inout lilFragData fd) + { + if(_UseEmission) + { + float emissionBlinkSeq = lilCalcBlink(_EmissionBlink); + float4 emissionColor = _EmissionColor; + float2 emissionUV = fd.uv0; + if(_EmissionMap_UVMode == 1) emissionUV = fd.uv1; + if(_EmissionMap_UVMode == 2) emissionUV = fd.uv2; + if(_EmissionMap_UVMode == 3) emissionUV = fd.uv3; + if(_EmissionMap_UVMode == 4) emissionUV = fd.uvRim; + emissionColor *= LIL_GET_EMITEX(_EmissionMap,emissionUV); + fd.emissionColor += emissionBlinkSeq * fd.triMask.b * emissionColor.rgb; + } + } +#endif + +#if !defined(OVERRIDE_EMISSION_1ST) + #if defined(LIL_LITE) + #define OVERRIDE_EMISSION_1ST \ + lilEmission(fd); + #else + #define OVERRIDE_EMISSION_1ST \ + lilEmission(fd LIL_SAMP_IN(sampler_MainTex)); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Emission 2nd +#if defined(LIL_FEATURE_EMISSION_2ND) && !defined(LIL_LITE) + void lilEmission2nd(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) + { + if(_UseEmission2nd) + { + float4 emission2ndColor = _Emission2ndColor; + // UV + float2 emission2ndUV = fd.uv0; + if(_Emission2ndMap_UVMode == 1) emission2ndUV = fd.uv1; + if(_Emission2ndMap_UVMode == 2) emission2ndUV = fd.uv2; + if(_Emission2ndMap_UVMode == 3) emission2ndUV = fd.uv3; + if(_Emission2ndMap_UVMode == 4) emission2ndUV = fd.uvRim; + //if(_Emission2ndMap_UVMode == 4) emission2ndUV = fd.uvPanorama; + float2 _Emission2ndMapParaTex = emission2ndUV + _Emission2ndParallaxDepth * fd.parallaxOffset; + // Texture + #if defined(LIL_FEATURE_Emission2ndMap) + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + emission2ndColor *= LIL_GET_EMITEX(_Emission2ndMap, _Emission2ndMapParaTex); + #else + emission2ndColor *= LIL_SAMPLE_2D_ST(_Emission2ndMap, sampler_Emission2ndMap, _Emission2ndMapParaTex); + #endif + #endif + // Mask + #if defined(LIL_FEATURE_Emission2ndBlendMask) + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + emission2ndColor *= LIL_GET_EMIMASK(_Emission2ndBlendMask, fd.uv0); + #else + emission2ndColor *= LIL_SAMPLE_2D_ST(_Emission2ndBlendMask, samp, fd.uvMain); + #endif + #endif + // Gradation + #if defined(LIL_FEATURE_Emission2ndGradTex) + #if defined(LIL_FEATURE_EMISSION_GRADATION) && defined(LIL_FEATURE_AUDIOLINK) + if(_Emission2ndUseGrad) + { + float gradUV = _Emission2ndGradSpeed * LIL_TIME + fd.audioLinkValue * _AudioLink2Emission2ndGrad; + emission2ndColor *= LIL_SAMPLE_1D_LOD(_Emission2ndGradTex, lil_sampler_linear_repeat, gradUV, 0); + } + #elif defined(LIL_FEATURE_EMISSION_GRADATION) + if(_Emission2ndUseGrad) emission2ndColor *= LIL_SAMPLE_1D(_Emission2ndGradTex, lil_sampler_linear_repeat, _Emission2ndGradSpeed * LIL_TIME); + #endif + #endif + #if defined(LIL_FEATURE_AUDIOLINK) + if(_AudioLink2Emission2nd) emission2ndColor.a *= fd.audioLinkValue; + #endif + emission2ndColor.rgb = lerp(emission2ndColor.rgb, emission2ndColor.rgb * fd.invLighting, _Emission2ndFluorescence); + emission2ndColor.rgb = lerp(emission2ndColor.rgb, emission2ndColor.rgb * fd.albedo, _Emission2ndMainStrength); + float emission2ndBlend = _Emission2ndBlend * lilCalcBlink(_Emission2ndBlink) * emission2ndColor.a; + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + emission2ndBlend *= fd.col.a; + #endif + fd.col.rgb = lilBlendColor(fd.col.rgb, emission2ndColor.rgb, emission2ndBlend, _Emission2ndBlendMode); + } + } +#endif + +#if !defined(OVERRIDE_EMISSION_2ND) + #define OVERRIDE_EMISSION_2ND \ + lilEmission2nd(fd LIL_SAMP_IN(sampler_MainTex)); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Dissolve Add +#if !defined(OVERRIDE_DISSOLVE_ADD) + #define OVERRIDE_DISSOLVE_ADD \ + fd.emissionColor += _DissolveColor.rgb * dissolveAlpha; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Blend Emission +#if !defined(OVERRIDE_BLEND_EMISSION) + #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + #define OVERRIDE_BLEND_EMISSION \ + fd.col.rgb += fd.emissionColor * fd.col.a; + #else + #define OVERRIDE_BLEND_EMISSION \ + fd.col.rgb += fd.emissionColor; + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Depth Fade +#if defined(LIL_FEATURE_DEPTH_FADE) && LIL_RENDER == 2 && !defined(LIL_REFRACTION) && !defined(LIL_LITE) + void lilDepthFade(inout lilFragData fd) + { + if((_DepthFadeTransparency < 1) && LIL_ENABLED_DEPTH_TEX) + { + float depthObj = fd.positionCS.w; + float depthCam = LIL_GET_DEPTH_TEX_CS(fd.positionCS.xy); + #if UNITY_REVERSED_Z + if(depthCam == 0) return; + #else + if(depthCam == 1) return; + #endif + depthCam = LIL_TO_LINEARDEPTH(depthCam,fd.positionCS.xy); + float depthDiff = depthCam - depthObj; + float factor = saturate(depthDiff * _DepthFadeSharpness + _DepthFadeTransparency); + if(_DepthFadeToColor) fd.col.rgb *= lerp(_DepthFadeColor.rgb, fd.col.rgb, factor); + if(_DepthFadeToAlpha) fd.col.a *= factor; + //fd.col.a *= saturate(depthDiff * 20 + 0); + } + //float4 _DepthFadeColor; + //float _DepthFadeSharpness; + //float _DepthFadeTransparency; + //uint _DepthFadeToColor; + //uint _DepthFadeToAlpha; + } +#endif + +#if !defined(OVERRIDE_DEPTH_FADE) + #define OVERRIDE_DEPTH_FADE lilDepthFade(fd); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Distance Fade +#if defined(LIL_FEATURE_DISTANCE_FADE) && !defined(LIL_LITE) + void lilDistanceFadeAlphaOnly(inout lilFragData fd) + { + float depth = _DistanceFadeMode ? fd.depthObject : fd.depth; + float distFade = saturate((depth - _DistanceFade.x) / (_DistanceFade.y - _DistanceFade.x)); + #if defined(LIL_OUTLINE) || defined(LIL_PASS_FORWARD_FUR_INCLUDED) + distFade = distFade * _DistanceFade.z; + #else + distFade = fd.facing < (_DistanceFade.w-1.0) ? _DistanceFade.z : distFade * _DistanceFade.z; + #endif + #if LIL_RENDER == 1 + fd.col.a = lerp(fd.col.a, fd.col.a * _DistanceFadeColor.a, distFade); + #endif + } + + void lilDistanceFade(inout lilFragData fd) + { + float depth = _DistanceFadeMode ? fd.depthObject : fd.depth; + float distFade = saturate((depth - _DistanceFade.x) / (_DistanceFade.y - _DistanceFade.x)); + #if defined(LIL_OUTLINE) || defined(LIL_PASS_FORWARD_FUR_INCLUDED) + distFade = distFade * _DistanceFade.z; + #else + distFade = fd.facing < (_DistanceFade.w-1.0) ? _DistanceFade.z : distFade * _DistanceFade.z; + #endif + + float3 fadeColor = _DistanceFadeColor.rgb; + #if defined(LIL_V2F_NORMAL_WS) + float nvabs = abs(dot(fd.origN,fd.headV)); + float fadeRim = pow(saturate(1.0 - nvabs), _DistanceFadeRimFresnelPower); + fadeColor = lerp(fadeColor, _DistanceFadeRimColor.rgb * fd.col.rgb, fadeRim * _DistanceFadeRimColor.a); + #endif + + #if defined(LIL_PASS_FORWARDADD) + fd.col.rgb = lerp(fd.col.rgb, 0.0, distFade); + #elif LIL_RENDER == 2 + fd.col.rgb = lerp(fd.col.rgb, fadeColor * _DistanceFadeColor.a, distFade); + fd.col.a = lerp(fd.col.a, fd.col.a * _DistanceFadeColor.a, distFade); + #else + fd.col.rgb = lerp(fd.col.rgb, fadeColor, distFade); + #endif + } +#endif + +#if !defined(OVERRIDE_DISTANCE_FADE) + #define OVERRIDE_DISTANCE_FADE \ + lilDistanceFade(fd); +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Fog +#if !defined(OVERRIDE_FOG) + #if defined(LIL_GEM) && !defined(LIL_GEM_PRE) + #define OVERRIDE_FOG \ + LIL_APPLY_FOG_COLOR(fd.col, input, fogColor); + #else + #define OVERRIDE_FOG \ + LIL_APPLY_FOG(fd.col, input); + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Output +#if !defined(OVERRIDE_OUTPUT) + #define OVERRIDE_OUTPUT \ + return fd.col; +#endif diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl.meta new file mode 100644 index 00000000..2b214b41 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_frag.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5c00516dfc33a2341a88d924b2d261ff +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl new file mode 100644 index 00000000..dd907abb --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------------------------------------------------------ +// Alpha in PS +// This is included in the subpass fragment shader +#define LIL_ALPHA_PS + +//------------------------------------------------------------------------------------------------------------------------------ +// UDIM Discard +#if defined(LIL_FEATURE_UDIMDISCARD) + OVERRIDE_UDIMDISCARD +#endif + +#if LIL_RENDER > 0 + #if defined(LIL_V2F_POSITION_WS) + LIL_GET_POSITION_WS_DATA(input,fd); + #endif + + #if defined(LIL_OUTLINE) + BEFORE_ANIMATE_OUTLINE_UV + OVERRIDE_ANIMATE_OUTLINE_UV + #else + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + #if defined(LIL_OUTLINE) + BEFORE_OUTLINE_COLOR + OVERRIDE_OUTLINE_COLOR + #else + BEFORE_MAIN + OVERRIDE_MAIN + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Layer Color + #if defined(LIL_V2F_TANGENT_WS) + fd.isRightHand = input.tangentWS.w > 0.0; + #endif + // 2nd + BEFORE_MAIN2ND + #if defined(LIL_FEATURE_MAIN2ND) + float main2ndDissolveAlpha = 0.0; + float4 color2nd = 1.0; + OVERRIDE_MAIN2ND + #endif + + // 3rd + BEFORE_MAIN3RD + #if defined(LIL_FEATURE_MAIN3RD) + float main3rdDissolveAlpha = 0.0; + float4 color3rd = 1.0; + OVERRIDE_MAIN3RD + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha Mask + BEFORE_ALPHAMASK + #if !defined(LIL_LITE) && defined(LIL_FEATURE_ALPHAMASK) + OVERRIDE_ALPHAMASK + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Dissolve + BEFORE_DISSOLVE + #if !defined(LIL_LITE) && defined(LIL_FEATURE_DISSOLVE) + float dissolveAlpha = 0.0; + if (fd.dissolveActive) + { + float priorAlpha = fd.col.a; + fd.col.a = 1.0f; + OVERRIDE_DISSOLVE + if (fd.dissolveInvert) + { + fd.col.a = 1.0f - fd.col.a; + dissolveAlpha = 1.0f - dissolveAlpha; + } + + fd.col.a *= priorAlpha; + } + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Fur + BEFORE_FUR + #if defined(LIL_FUR) && defined(LIL_V2F_FURLAYER) + OVERRIDE_FUR + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Dither + BEFORE_DITHER + #if !defined(LIL_LITE) && defined(LIL_FEATURE_DITHER) && LIL_RENDER == 1 + OVERRIDE_DITHER + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Cutout + clip(fd.col.a - _Cutoff); + #if LIL_RENDER == 2 && !defined(SHADER_API_GLES) + // Dither + float alphaRef = fd.col.a; + #if defined(LIL_FUR) && defined(LIL_V2F_FURLAYER) && defined(SHADERPASS) && (SHADERPASS == SHADERPASS_SHADOWS) + fd.col.a = saturate(fd.col.a*5.0); + #endif + #if LIL_SUBPASS_TRANSPARENT_MODE == 1 || defined(SHADERPASS) && (SHADERPASS == SHADERPASS_SHADOWS) + alphaRef = lilSampleDither(_DitherMaskLOD, input.positionCS.xy, fd.col.a); + #elif LIL_SUBPASS_TRANSPARENT_MODE == 0 && defined(LIL_PASS_SHADOWCASTER_INCLUDED) + #if defined(SHADOWS_DEPTH) + if(LIL_MATRIX_P._m33 != 0.0) + #endif + alphaRef = lilSampleDither(_DitherMaskLOD, input.positionCS.xy, fd.col.a); + #endif + clip(alphaRef - _SubpassCutoff); + #endif +#endif +#undef LIL_ALPHA_PS \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl.meta new file mode 100644 index 00000000..ad92af6c --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_frag_alpha.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 184b658250bd4db4798f485de4e4b00b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl new file mode 100644 index 00000000..22c48c47 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl @@ -0,0 +1,1224 @@ +#ifndef LIL_FUNCTIONS_INCLUDED +#define LIL_FUNCTIONS_INCLUDED + +#include "lil_common_functions_thirdparty.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Math + +// Tooning +#if LIL_ANTIALIAS_MODE == 0 + float lilIsIn0to1(float f) + { + return saturate(f) == f; + } + + float lilIsIn0to1(float f, float nv) + { + return saturate(f) == f; + } + + float lilTooningNoSaturateScale(float aascale, float value, float border) + { + return step(border, value); + } + + float lilTooningNoSaturateScale(float aascale, float value, float border, float blur) + { + float borderMin = saturate(border - blur * 0.5); + float borderMax = saturate(border + blur * 0.5); + return (value - borderMin) / saturate(borderMax - borderMin); + } + + float lilTooningNoSaturateScale(float aascale, float value, float border, float blur, float borderRange) + { + float borderMin = saturate(border - blur * 0.5 - borderRange); + float borderMax = saturate(border + blur * 0.5); + return (value - borderMin) / saturate(borderMax - borderMin); + } +#else + float lilIsIn0to1(float f) + { + float value = 0.5 - abs(f-0.5); + return saturate(value / clamp(fwidth(value), 0.0001, 1.0)); + } + + float lilIsIn0to1(float f, float nv) + { + float value = 0.5 - abs(f-0.5); + return saturate(value / clamp(fwidth(value), 0.0001, nv)); + } + + float lilTooningNoSaturateScale(float aascale, float value, float border) + { + return (value - border) / clamp(fwidth(value) * aascale, 0.0001, 1.0); + } + + float lilTooningNoSaturateScale(float aascale, float value, float border, float blur) + { + float borderMin = saturate(border - blur * 0.5); + float borderMax = saturate(border + blur * 0.5); + return (value - borderMin) / saturate(borderMax - borderMin + fwidth(value) * aascale); + } + + float lilTooningNoSaturateScale(float aascale, float value, float border, float blur, float borderRange) + { + float borderMin = saturate(border - blur * 0.5 - borderRange); + float borderMax = saturate(border + blur * 0.5); + return (value - borderMin) / saturate(borderMax - borderMin + fwidth(value) * aascale); + } +#endif + +float lilTooningScale(float aascale, float value, float border) +{ + return saturate(lilTooningNoSaturateScale(aascale, value, border)); +} + +float lilTooningScale(float aascale, float value, float border, float blur) +{ + return saturate(lilTooningNoSaturateScale(aascale, value, border, blur)); +} + +float lilTooningScale(float aascale, float value, float border, float blur, float borderRange) +{ + return saturate(lilTooningNoSaturateScale(aascale, value, border, blur, borderRange)); +} + +float lilTooningNoSaturate(float value, float border) +{ + return lilTooningNoSaturateScale(1.0, value, border); +} + +float lilTooningNoSaturate(float value, float border, float blur) +{ + return lilTooningNoSaturateScale(1.0, value, border, blur); +} + +float lilTooningNoSaturate(float value, float border, float blur, float borderRange) +{ + return lilTooningNoSaturateScale(1.0, value, border, blur, borderRange); +} + +float lilTooning(float value, float border) +{ + return saturate(lilTooningNoSaturate(value, border)); +} + +float lilTooning(float value, float border, float blur) +{ + return saturate(lilTooningNoSaturate(value, border, blur)); +} + +float lilTooning(float value, float border, float blur, float borderRange) +{ + return saturate(lilTooningNoSaturate(value, border, blur, borderRange)); +} + +// Optimized matrix calculation +float4 lilOptMul(float4x4 mat, float3 pos) +{ + return mat._m00_m10_m20_m30 * pos.x + (mat._m01_m11_m21_m31 * pos.y + (mat._m02_m12_m22_m32 * pos.z + mat._m03_m13_m23_m33)); +} + +// Check if the value is within range +float lilIsIn0to1(float2 f) +{ + return lilIsIn0to1(f.x) * lilIsIn0to1(f.y); +} + +float lilIsIn0to1(float2 f, float nv) +{ + return lilIsIn0to1(f.x, nv) * lilIsIn0to1(f.y, nv); +} + +// Normal blend in tangent space +float3 lilBlendNormal(float3 dstNormal, float3 srcNormal) +{ + return float3(dstNormal.xy + srcNormal.xy, dstNormal.z * srcNormal.z); +} + +float lilMedian(float r, float g, float b) +{ + return max(min(r, g), min(max(r, g), b)); +} + +float lilMSDF(float3 msd) +{ + float sd = lilMedian(msd.r, msd.g, msd.b); + return saturate((sd - 0.5)/clamp(fwidth(sd), 0.01, 1.0)); +} + +float lilIntervalTime(float interval) +{ + return floor(LIL_TIME / interval) * interval; +} + +float lilNsqDistance(float2 a, float2 b) +{ + return dot(a-b,a-b); +} + +float3 lilOrthoNormalize(float3 tangent, float3 normal) +{ + return normalize(tangent - normal * dot(normal, tangent)); +} + +float3 lilUnpackNormalScale(float4 normalTex, float scale) +{ + float3 normal; + #if defined(UNITY_NO_DXT5nm) + normal = normalTex.rgb * 2.0 - 1.0; + normal.xy *= scale; + #else + #if !defined(UNITY_ASTC_NORMALMAP_ENCODING) + normalTex.a *= normalTex.r; + #endif + normal.xy = normalTex.ag * 2.0 - 1.0; + normal.xy *= scale; + normal.z = sqrt(1.0 - saturate(dot(normal.xy, normal.xy))); + #endif + return normal; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Position Transform +struct lilVertexPositionInputs +{ + float3 positionWS; // World space + float3 positionVS; // View space + float4 positionCS; // Clip space + float4 positionSS; // Screen space +}; + +lilVertexPositionInputs lilGetVertexPositionInputs(float4 positionOS) +{ + lilVertexPositionInputs output; + output.positionWS = lilTransformOStoWS(positionOS); + output.positionVS = lilTransformWStoVS(output.positionWS); + output.positionCS = lilTransformWStoCS(output.positionWS); + output.positionSS = lilTransformCStoSS(output.positionCS); + return output; +} + +lilVertexPositionInputs lilGetVertexPositionInputs(float3 positionOS) +{ + return lilGetVertexPositionInputs(float4(positionOS, 1.0)); +} + +lilVertexPositionInputs lilReGetVertexPositionInputs(lilVertexPositionInputs output) +{ + output.positionVS = lilTransformWStoVS(output.positionWS); + output.positionCS = lilTransformWStoCS(output.positionWS); + output.positionSS = lilTransformCStoSS(output.positionCS); + return output; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Normal Transform +struct lilVertexNormalInputs +{ + float3 tangentWS; + float3 bitangentWS; + float3 normalWS; +}; + +lilVertexNormalInputs lilGetVertexNormalInputs() +{ + lilVertexNormalInputs output; + output.normalWS = float3(1.0, 0.0, 0.0); + output.tangentWS = float3(1.0, 0.0, 0.0); + output.bitangentWS = float3(0.0, 1.0, 0.0); + return output; +} + +lilVertexNormalInputs lilGetVertexNormalInputs(float3 normalOS) +{ + lilVertexNormalInputs output; + output.normalWS = lilTransformNormalOStoWS(normalOS, true); + output.tangentWS = float3(1.0, 0.0, 0.0); + output.bitangentWS = float3(0.0, 1.0, 0.0); + return output; +} + +lilVertexNormalInputs lilGetVertexNormalInputs(float3 normalOS, float4 tangentOS) +{ + lilVertexNormalInputs output; + output.normalWS = lilTransformNormalOStoWS(normalOS, true); + output.tangentWS = lilTransformDirOStoWS(tangentOS.xyz, true); + output.bitangentWS = cross(output.normalWS, output.tangentWS) * (tangentOS.w * LIL_NEGATIVE_SCALE); + return output; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Outline +float lilGetOutlineWidth(float2 uv, float4 color, float outlineWidth, TEXTURE2D(outlineWidthMask), uint outlineVertexR2Width LIL_SAMP_IN_FUNC(samp)) +{ + outlineWidth *= 0.01; + #if defined(LIL_FEATURE_OutlineWidthMask) + outlineWidth *= LIL_SAMPLE_2D_LOD(outlineWidthMask, samp, uv, 0).r; + #endif + if(outlineVertexR2Width == 1) outlineWidth *= color.r; + if(outlineVertexR2Width == 2) outlineWidth *= color.a; + return outlineWidth; +} + +float lilGetOutlineWidth(float3 positionOS, float3 positionWS, float2 uv, float4 color, float outlineWidth, TEXTURE2D(outlineWidthMask), uint outlineVertexR2Width, float outlineFixWidth LIL_SAMP_IN_FUNC(samp)) +{ + outlineWidth = lilGetOutlineWidth(uv, color, outlineWidth, outlineWidthMask, outlineVertexR2Width LIL_SAMP_IN(samp)); + outlineWidth *= lerp(1.0, saturate(length(lilHeadDirection(positionWS))), outlineFixWidth); + return outlineWidth; +} + +float3 lilGetOutlineVector(float3x3 tbnOS, float2 uv, float outlineVectorScale, TEXTURE2D(outlineVectorTex) LIL_SAMP_IN_FUNC(samp)) +{ + float3 outlineVector = lilUnpackNormalScale(LIL_SAMPLE_2D_LOD(outlineVectorTex, samp, uv, 0), outlineVectorScale); + outlineVector = mul(outlineVector, tbnOS); + return outlineVector; +} + +void lilCalcOutlinePosition(inout float3 positionOS, float2 uvs[4], float4 color, float3 normalOS, float3x3 tbnOS, float outlineWidth, TEXTURE2D(outlineWidthMask), uint outlineVertexR2Width, float outlineFixWidth, float outlineZBias, float outlineVectorScale, uint outlineVectorUVMode, TEXTURE2D(outlineVectorTex) LIL_SAMP_IN_FUNC(samp)) +{ + float3 positionWS = lilToAbsolutePositionWS(lilOptMul(LIL_MATRIX_M, positionOS).xyz); + float width = lilGetOutlineWidth(positionOS, positionWS, uvs[0], color, outlineWidth, outlineWidthMask, outlineVertexR2Width, outlineFixWidth LIL_SAMP_IN(samp)); + float3 outlineN = normalOS; + #if defined(LIL_FEATURE_OutlineVectorTex) + outlineN = lilGetOutlineVector(tbnOS, uvs[outlineVectorUVMode], outlineVectorScale, outlineVectorTex LIL_SAMP_IN(samp)); + #endif + if(outlineVertexR2Width == 2) outlineN = mul(color.rgb * 2.0 - 1.0, tbnOS); + positionOS += outlineN * width; + float3 V = lilIsPerspective() ? lilViewDirectionOS(positionOS) : mul((float3x3)LIL_MATRIX_I_M, LIL_MATRIX_V._m20_m21_m22); + positionOS -= normalize(V) * outlineZBias; +} + +void lilCalcOutlinePositionLite(inout float3 positionOS, float2 uv, float4 color, float3 normalOS, float3x3 tbnOS, float outlineWidth, TEXTURE2D(outlineWidthMask), uint outlineVertexR2Width, float outlineFixWidth, float outlineZBias LIL_SAMP_IN_FUNC(samp)) +{ + float3 positionWS = lilToAbsolutePositionWS(lilOptMul(LIL_MATRIX_M, positionOS).xyz); + float width = lilGetOutlineWidth(positionOS, positionWS, uv, color, outlineWidth, outlineWidthMask, outlineVertexR2Width, outlineFixWidth LIL_SAMP_IN(samp)); + float3 outlineN = normalOS; + if(outlineVertexR2Width == 2) outlineN = mul(color.rgb * 2.0 - 1.0, tbnOS); + positionOS += outlineN * width; + float3 V = lilIsPerspective() ? lilViewDirectionOS(positionOS) : mul((float3x3)LIL_MATRIX_I_M, LIL_MATRIX_V._m20_m21_m22); + positionOS -= normalize(V) * outlineZBias; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Color +float3 lilBlendColor(float3 dstCol, float3 srcCol, float3 srcA, uint blendMode) +{ + float3 ad = dstCol + srcCol; + float3 mu = dstCol * srcCol; + float3 outCol; + if(blendMode == 0) outCol = srcCol; // Normal + if(blendMode == 1) outCol = ad; // Add + if(blendMode == 2) outCol = max(ad - mu, dstCol); // Screen + if(blendMode == 3) outCol = mu; // Multiply + return lerp(dstCol, outCol, srcA); +} + +float3 lilBlendColor(float3 dstCol, float3 srcCol, float srcA, uint blendMode) +{ + return lilBlendColor(dstCol, srcCol, float3(srcA,srcA,srcA), blendMode); +} + +float lilGray(float3 rgb) +{ + return dot(rgb, float3(1.0/3.0, 1.0/3.0, 1.0/3.0)); +} + +float3 lilToneCorrection(float3 c, float4 hsvg) +{ + // gamma + c = pow(abs(c), hsvg.w); + // rgb -> hsv + float4 p = (c.b > c.g) ? float4(c.bg,-1.0,2.0/3.0) : float4(c.gb,0.0,-1.0/3.0); + float4 q = (p.x > c.r) ? float4(p.xyw, c.r) : float4(c.r, p.yzx); + float d = q.x - min(q.w, q.y); + float e = 1.0e-10; + float3 hsv = float3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); + // shift + hsv = float3(hsv.x+hsvg.x,saturate(hsv.y*hsvg.y),saturate(hsv.z*hsvg.z)); + // hsv -> rgb + return hsv.z - hsv.z * hsv.y + hsv.z * hsv.y * saturate(abs(frac(hsv.x + float3(1.0, 2.0/3.0, 1.0/3.0)) * 6.0 - 3.0) - 1.0); +} + +float3 lilGradationMap(float3 col, TEXTURE2D(gradationMap), float strength) +{ + if(strength == 0.0) return col; + #if !defined(LIL_COLORSPACE_GAMMA) + col = lilLinearToSRGB(col); + #endif + float R = LIL_SAMPLE_1D(gradationMap, lil_sampler_linear_clamp, col.r).r; + float G = LIL_SAMPLE_1D(gradationMap, lil_sampler_linear_clamp, col.g).g; + float B = LIL_SAMPLE_1D(gradationMap, lil_sampler_linear_clamp, col.b).b; + float3 outrgb = float3(R,G,B); + #if !defined(LIL_COLORSPACE_GAMMA) + col = lilSRGBToLinear(col); + outrgb = lilSRGBToLinear(outrgb); + #endif + return lerp(col, outrgb, strength); +} + +float3 lilDecodeHDR(float4 data, float4 hdr) +{ + float alpha = hdr.w * (data.a - 1.0) + 1.0; + + #if defined(LIL_COLORSPACE_GAMMA) + return (hdr.x * alpha) * data.rgb; + #elif defined(UNITY_USE_NATIVE_HDR) + return hdr.x * data.rgb; + #else + return (hdr.x * pow(abs(alpha), hdr.y)) * data.rgb; + #endif +} + +void lilCalcLUTUV(float3 col, float resX, float resY, inout float4 uv, inout float factor) +{ + #if !defined(UNITY_COLORSPACE_GAMMA) + col = lilLinearToSRGB(col); + #endif + float3 res = float3(resX, resY, resX * resY); + float3 resInv = float3(1.0, -1.0, 1.0) / res; + + float3 col2 = (col - col * resInv.z) + 0.5 * resInv.z; + float4 b2 = saturate(col2.b + resInv.z * float2(-0.5, 0.5)).xxyy * res.zyzy; + float4 b3 = floor(b2); + uv = float4(0,1,0,1) + (col2.rgrg + b3) * resInv.xyxy; + factor = abs(b2.x - b3.x); +} + +float4 lilSampleLUT(float4 uv, float factor, TEXTURE2D(lutTex)) +{ + float4 a = LIL_SAMPLE_2D_LOD(lutTex, lil_sampler_linear_clamp, uv.xy, 0); + float4 b = LIL_SAMPLE_2D_LOD(lutTex, lil_sampler_linear_clamp, uv.zw, 0); + return lerp(a, b, factor); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// UV + +// Rotation +float2 lilRotateUV(float2 uv, float2x2 rotMatrix) +{ + return mul(rotMatrix, uv - 0.5) + 0.5; +} + +float2 lilRotateUV(float2 uv, float angle) +{ + float si,co; + sincos(angle, si, co); + float2 outuv = uv - 0.5; + outuv = float2( + outuv.x * co - outuv.y * si, + outuv.x * si + outuv.y * co + ); + outuv += 0.5; + return outuv; +} + +// Tiling, offset, animation calculations +float2 lilCalcUV(float2 uv, float4 uv_st) +{ + return uv * uv_st.xy + uv_st.zw; +} + +float2 lilCalcUV(float2 uv, float4 uv_st, float angle) +{ + float2 outuv = uv * uv_st.xy + uv_st.zw; + outuv = lilRotateUV(outuv, angle); + return outuv; +} + +float2 lilCalcUV(float2 uv, float4 uv_st, float2 uv_sr) +{ + return uv * uv_st.xy + uv_st.zw + frac(uv_sr * LIL_TIME); +} + +float2 lilCalcUV(float2 uv, float4 uv_st, float4 uv_sr) +{ + float2 outuv = uv * uv_st.xy + uv_st.zw; + outuv = lilRotateUV(outuv, uv_sr.z + uv_sr.w * LIL_TIME) + frac(uv_sr.xy * LIL_TIME); + return outuv; +} + +float2 lilCalcUVWithoutAnimation(float2 uv, float4 uv_st, float4 uv_sr) +{ + return lilRotateUV(uv * uv_st.xy + uv_st.zw, uv_sr.z); +} + +float2 lilCalcDoubleSideUV(float2 uv, float facing, float shiftBackfaceUV) +{ + return facing < (shiftBackfaceUV-1.0) ? uv + float2(1.0,0.0) : uv; +} + +// Decal +float2 lilCalcDecalUV( + float2 uv, + float4 uv_ST, + float angle, + bool isLeftOnly, + bool isRightOnly, + bool shouldCopy, + bool shouldFlipMirror, + bool shouldFlipCopy, + bool isRightHand) +{ + float2 outUV = uv; + + // Copy + if(shouldCopy) outUV.x = abs(outUV.x - 0.5) + 0.5; + + // Scale & Offset + outUV = outUV * uv_ST.xy + uv_ST.zw; + + // Flip + if(shouldFlipCopy && uv.x<0.5) outUV.x = 1.0 - outUV.x; + if(shouldFlipMirror && isRightHand) outUV.x = 1.0 - outUV.x; + + // Hide + if(isLeftOnly && isRightHand) outUV.x = -1.0; + if(isRightOnly && !isRightHand) outUV.x = -1.0; + + // Rotate + outUV = (outUV - uv_ST.zw) / uv_ST.xy; + outUV = lilRotateUV(outUV, angle); + outUV = outUV * uv_ST.xy + uv_ST.zw; + + return outUV; +} + +float2 lilCalcDecalUV( + float2 uv, + float4 uv_ST, + float4 uv_SR, + bool isLeftOnly, + bool isRightOnly, + bool shouldCopy, + bool shouldFlipMirror, + bool shouldFlipCopy, + bool isRightHand) +{ + float4 uv_ST2 = uv_ST + float4(0,0,uv_SR.xy) * LIL_TIME; + float angle2 = uv_SR.z+ uv_SR.w * LIL_TIME; + return lilCalcDecalUV( + uv, + uv_ST2, + angle2, + isLeftOnly, + isRightOnly, + shouldCopy, + shouldFlipMirror, + shouldFlipCopy, + isRightHand); +} + +float2 lilCalcAtlasAnimation(float2 uv, float4 decalAnimation, float4 decalSubParam) +{ + float2 outuv = lerp(float2(uv.x, 1.0-uv.y), 0.5, decalSubParam.z); + uint animTime = (uint)(LIL_TIME * decalAnimation.w) % (uint)decalAnimation.z; + uint offsetX = animTime % (uint)decalAnimation.x; + uint offsetY = animTime / (uint)decalAnimation.x; + outuv = (outuv + float2(offsetX,offsetY)) * decalSubParam.xy / decalAnimation.xy; + outuv.y = 1.0-outuv.y; + return outuv; +} + +// MatCap +float2 lilCalcMatCapUV(float2 uv1, float3 normalWS, float3 viewDirection, float3 headDirection, float4 matcap_ST, float2 matcapBlendUV1, bool zRotCancel, bool matcapPerspective, float matcapVRParallaxStrength) +{ + // Simple + //return mul((float3x3)LIL_MATRIX_V, normalWS).xy * 0.5 + 0.5; + float3 normalVD = lilBlendVRParallax(headDirection, viewDirection, matcapVRParallaxStrength); + normalVD = lilIsPerspective() && matcapPerspective ? normalVD : lilCameraDirection(); + float3 bitangentVD = zRotCancel ? float3(0,1,0) : LIL_MATRIX_V._m10_m11_m12; + bitangentVD = lilOrthoNormalize(bitangentVD, normalVD); + float3 tangentVD = cross(normalVD, bitangentVD); + float3x3 tbnVD = float3x3(tangentVD, bitangentVD, normalVD); + float2 uvMat = mul(tbnVD, normalWS).xy; + uvMat = lerp(uvMat, uv1*2-1, matcapBlendUV1); + uvMat = uvMat * matcap_ST.xy + matcap_ST.zw; + uvMat = uvMat * 0.5 + 0.5; + return uvMat; +} + +// Panorama +float2 lilGetPanoramaUV(float3 viewDirection) +{ + return float2(lilAtan(viewDirection.x, viewDirection.z), lilAcos(viewDirection.y)) * LIL_INV_PI; +} + +// Parallax +void lilParallax(inout float2 uvMain, inout float2 uv, lilBool useParallax, float2 parallaxOffset, TEXTURE2D(parallaxMap), float parallaxScale, float parallaxOffsetParam) +{ + if(useParallax) + { + float height = (LIL_SAMPLE_2D_LOD(parallaxMap,lil_sampler_linear_repeat,uvMain,0).r - parallaxOffsetParam) * parallaxScale; + uvMain += height * parallaxOffset; + uv += height * parallaxOffset; + } +} + +void lilPOM(inout float2 uvMain, inout float2 uv, lilBool useParallax, float4 uv_st, float3 parallaxViewDirection, TEXTURE2D(parallaxMap), float parallaxScale, float parallaxOffsetParam) +{ + #define LIL_POM_DETAIL 200 + if(useParallax) + { + float height; + float height2; + float3 rayStep = -parallaxViewDirection; + float3 rayPos = float3(uvMain, 1.0) + (1.0-parallaxOffsetParam) * parallaxScale * parallaxViewDirection; + rayStep.xy *= uv_st.xy; + rayStep = rayStep / LIL_POM_DETAIL; + rayStep.z /= parallaxScale; + + for(int i = 0; i < LIL_POM_DETAIL * 2 * parallaxScale; ++i) + { + height2 = height; + rayPos += rayStep; + height = LIL_SAMPLE_2D_LOD(parallaxMap,lil_sampler_linear_repeat,rayPos.xy,0).r; + if(height >= rayPos.z) break; + } + + float2 prevObjPoint = rayPos.xy - rayStep.xy; + float nextHeight = height - rayPos.z; + float prevHeight = height2 - rayPos.z + rayStep.z; + + float weight = nextHeight / (nextHeight - prevHeight); + rayPos.xy = lerp(rayPos.xy, prevObjPoint, weight); + + uv += rayPos.xy - uvMain; + uvMain = rayPos.xy; + } +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Effect +float lilCalcBlink(float4 blink) +{ + float outBlink = sin(LIL_TIME * blink.z + blink.w) * 0.5 + 0.5; + if(blink.y > 0.5) outBlink = round(outBlink); + return lerp(1.0, outBlink, blink.x); +} + +void lilCalcDissolve( + inout float alpha, + inout float dissolveAlpha, + float2 uv, + float3 positionOS, + float4 dissolveParams, + float4 dissolvePos, + TEXTURE2D(dissolveMask), + float4 dissolveMask_ST, + bool dissolveMaskEnabled + LIL_SAMP_IN_FUNC(samp)) +{ + dissolveParams.xy = round(dissolveParams.xy); // mode, shape + + if(dissolveParams.r) + { + float dissolveMaskVal = 1.0; + if(dissolveParams.r == 1.0 && dissolveMaskEnabled) + { + dissolveMaskVal = LIL_SAMPLE_2D(dissolveMask, samp, lilCalcUV(uv, dissolveMask_ST)).r; + } + if(dissolveParams.r == 1.0) + { + dissolveAlpha = 1.0 - saturate(abs(dissolveMaskVal - dissolveParams.b) / dissolveParams.a); + dissolveMaskVal = dissolveMaskVal > dissolveParams.b ? 1.0 : 0.0; + } + if(dissolveParams.r == 2.0) + { + dissolveAlpha = dissolveParams.g == 1.0 ? lilRotateUV(uv, dissolvePos.w).x : distance(uv, dissolvePos.xy); + dissolveMaskVal *= dissolveAlpha > dissolveParams.b ? 1.0 : 0.0; + dissolveAlpha = 1.0 - saturate(abs(dissolveAlpha - dissolveParams.b) / dissolveParams.a); + } + if(dissolveParams.r == 3.0) + { + dissolveAlpha = dissolveParams.g == 1.0 ? dot(positionOS, normalize(dissolvePos.xyz)).x : distance(positionOS, dissolvePos.xyz); + dissolveMaskVal *= dissolveAlpha > dissolveParams.b ? 1.0 : 0.0; + dissolveAlpha = 1.0 - saturate(abs(dissolveAlpha - dissolveParams.b) / dissolveParams.a); + } + alpha *= dissolveMaskVal; + } +} + +void lilCalcDissolveWithNoise( + inout float alpha, + inout float dissolveAlpha, + float2 uv, + float3 positionOS, + float4 dissolveParams, + float4 dissolvePos, + TEXTURE2D(dissolveMask), + float4 dissolveMask_ST, + bool dissolveMaskEnabled, + TEXTURE2D(dissolveNoiseMask), + float4 dissolveNoiseMask_ST, + float4 dissolveNoiseMask_ScrollRotate, + float dissolveNoiseStrength + LIL_SAMP_IN_FUNC(samp)) +{ + dissolveParams.xy = round(dissolveParams.xy); // mode, shape + + if(dissolveParams.r) + { + float dissolveMaskVal = 1.0; + float dissolveNoise = 0.0; + if(dissolveParams.r == 1.0 && dissolveMaskEnabled) + { + dissolveMaskVal = LIL_SAMPLE_2D(dissolveMask, samp, lilCalcUV(uv, dissolveMask_ST)).r; + } + dissolveNoise = LIL_SAMPLE_2D(dissolveNoiseMask, samp, lilCalcUV(uv, dissolveNoiseMask_ST, dissolveNoiseMask_ScrollRotate.xy)).r - 0.5; + dissolveNoise *= dissolveNoiseStrength; + if(dissolveParams.r == 1.0) + { + dissolveAlpha = 1.0 - saturate(abs(dissolveMaskVal + dissolveNoise - dissolveParams.b) / dissolveParams.a); + dissolveMaskVal = dissolveMaskVal + dissolveNoise > dissolveParams.b ? 1.0 : 0.0; + } + if(dissolveParams.r == 2.0) + { + dissolveAlpha = dissolveParams.g == 1.0 ? dot(uv, normalize(dissolvePos.xy)) + dissolveNoise : distance(uv, dissolvePos.xy) + dissolveNoise; + dissolveMaskVal *= dissolveAlpha > dissolveParams.b ? 1.0 : 0.0; + dissolveAlpha = 1.0 - saturate(abs(dissolveAlpha - dissolveParams.b) / dissolveParams.a); + } + if(dissolveParams.r == 3.0) + { + dissolveAlpha = dissolveParams.g == 1.0 ? dot(positionOS, normalize(dissolvePos.xyz)) + dissolveNoise : distance(positionOS, dissolvePos.xyz) + dissolveNoise; + dissolveMaskVal *= dissolveAlpha > dissolveParams.b ? 1.0 : 0.0; + dissolveAlpha = 1.0 - saturate(abs(dissolveAlpha - dissolveParams.b) / dissolveParams.a); + } + alpha *= dissolveMaskVal; + } +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Sub Texture +float4 lilGetSubTex( + TEXTURE2D(tex), + float4 uv_ST, + float4 uv_SR, + float angle, + float2 uv, + float nv, + bool isDecal, + bool isLeftOnly, + bool isRightOnly, + bool shouldCopy, + bool shouldFlipMirror, + bool shouldFlipCopy, + bool isMSDF, + bool isRightHand, + float4 decalAnimation, + float4 decalSubParam + LIL_SAMP_IN_FUNC(samp)) +{ + #if defined(LIL_FEATURE_DECAL) + float4 uv_SR2 = float4(uv_SR.xy, angle, uv_SR.w); + float2 uv2 = lilCalcDecalUV(uv, uv_ST, uv_SR2, isLeftOnly, isRightOnly, shouldCopy, shouldFlipMirror, shouldFlipCopy, isRightHand); + #if defined(LIL_FEATURE_ANIMATE_DECAL) + float2 uv2samp = lilCalcAtlasAnimation(uv2, decalAnimation, decalSubParam); + #else + float2 uv2samp = uv2; + #endif + float4 outCol = LIL_SAMPLE_2D(tex,samp,uv2samp); + if(isMSDF) outCol = float4(1.0, 1.0, 1.0, lilMSDF(outCol.rgb)); + if(isDecal) outCol.a *= lilIsIn0to1(uv2, saturate(nv-0.05)); + return outCol; + #else + float4 uv_SR2 = float4(uv_SR.xy, angle, uv_SR.w); + float2 uv2 = lilCalcUV(uv, uv_ST, uv_SR2); + float4 outCol = LIL_SAMPLE_2D(tex,samp,uv2); + if(isMSDF) outCol = float4(1.0, 1.0, 1.0, lilMSDF(outCol.rgb)); + return outCol; + #endif +} + +float4 lilGetSubTexWithoutAnimation( + TEXTURE2D(tex), + float4 uv_ST, + float4 uv_SR, + float angle, + float2 uv, + float nv, + bool isDecal, + bool isLeftOnly, + bool isRightOnly, + bool shouldCopy, + bool shouldFlipMirror, + bool shouldFlipCopy, + bool isMSDF, + bool isRightHand + LIL_SAMP_IN_FUNC(samp)) +{ + #if defined(LIL_FEATURE_DECAL) + float2 uv2 = lilCalcDecalUV(uv, uv_ST, angle, isLeftOnly, isRightOnly, shouldCopy, shouldFlipMirror, shouldFlipCopy, isRightHand); + float4 outCol = LIL_SAMPLE_2D(tex,samp,uv2); + if(isMSDF) outCol = float4(1.0, 1.0, 1.0, lilMSDF(outCol.rgb)); + if(isDecal) outCol.a *= lilIsIn0to1(uv2, saturate(nv-0.05)); + return outCol; + #else + float2 uv2 = lilCalcUV(uv, uv_ST, angle); + float4 outCol = LIL_SAMPLE_2D(tex,samp,uv2); + if(isMSDF) outCol = float4(1.0, 1.0, 1.0, lilMSDF(outCol.rgb)); + return outCol; + #endif +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Light Direction +float3 lilGetCustomLightDirection(float4 lightDirectionOverride) +{ + float3 customDir = length(lightDirectionOverride.xyz) * normalize(mul((float3x3)LIL_MATRIX_M, lightDirectionOverride.xyz)); + return lightDirectionOverride.w ? customDir : lightDirectionOverride.xyz; +} + +float3 lilGetLightDirectionForSH9() +{ + float3 mainDir = LIL_MAINLIGHT_DIRECTION * lilLuminance(LIL_MAINLIGHT_COLOR); + float3 sh9Dir = unity_SHAr.xyz * 0.333333 + unity_SHAg.xyz * 0.333333 + unity_SHAb.xyz * 0.333333; + float3 lightDirectionForSH9 = sh9Dir + mainDir; + return dot(lightDirectionForSH9,lightDirectionForSH9) < 0.000001 ? 0 : normalize(lightDirectionForSH9); +} + +float3 lilGetLightDirection(float4 lightDirectionOverride) +{ + float3 mainDir = LIL_MAINLIGHT_DIRECTION * lilLuminance(LIL_MAINLIGHT_COLOR); + float3 sh9Dir = unity_SHAr.xyz * 0.333333 + unity_SHAg.xyz * 0.333333 + unity_SHAb.xyz * 0.333333; + return normalize(mainDir + sh9Dir + lilGetCustomLightDirection(lightDirectionOverride)); +} + +float3 lilGetFixedLightDirection(float4 lightDirectionOverride, bool doNormalise) +{ + float3 mainDir = LIL_MAINLIGHT_DIRECTION * lilLuminance(LIL_MAINLIGHT_COLOR); + float3 sh9Dir = unity_SHAr.xyz * 0.333333 + unity_SHAg.xyz * 0.333333 + unity_SHAb.xyz * 0.333333; + float3 L = float3(sh9Dir.x, abs(sh9Dir.y), sh9Dir.z) + mainDir + lilGetCustomLightDirection(lightDirectionOverride); + return doNormalise ? normalize(L) : L; +} + +float3 lilGetFixedLightDirection(float4 lightDirectionOverride) +{ + return lilGetFixedLightDirection(lightDirectionOverride, true); +} + +float3 lilGetLightDirection() +{ + return lilGetLightDirection(float4(0.001,0.002,0.001,0.0)); +} + +float3 lilGetLightDirection(float3 positionWS) +{ + #if defined(POINT) || defined(SPOT) || defined(POINT_COOKIE) + return normalize(LIL_MAINLIGHT_DIRECTION - positionWS); + #else + return LIL_MAINLIGHT_DIRECTION; + #endif +} + +//------------------------------------------------------------------------------------------------------------------------------ +// SH Lighting +float3 lilShadeSH9(float4 normalWS) +{ + float3 res; + res.r = dot(unity_SHAr,normalWS); + res.g = dot(unity_SHAg,normalWS); + res.b = dot(unity_SHAb,normalWS); + float4 vB = normalWS.xyzz * normalWS.yzzx; + res.r += dot(unity_SHBr,vB); + res.g += dot(unity_SHBg,vB); + res.b += dot(unity_SHBb,vB); + res += unity_SHC.rgb * (normalWS.x * normalWS.x - normalWS.y * normalWS.y); + #ifdef LIL_COLORSPACE_GAMMA + res = lilLinearToSRGB(res); + #endif + return res; +} + +float3 lilShadeSH9(float3 normalWS) +{ + return lilShadeSH9(float4(normalWS,1.0)); +} + +float3 lilShadeSH9LPPV(float4 normalWS, float3 positionWS) +{ + float4 SHAr = unity_SHAr; + float4 SHAg = unity_SHAg; + float4 SHAb = unity_SHAb; + #if defined(LIL_USE_LPPV) + if(unity_ProbeVolumeParams.x == 1.0) + { + float3 position = (unity_ProbeVolumeParams.y == 1.0) ? lilOptMul(unity_ProbeVolumeWorldToObject, positionWS).xyz : positionWS; + float3 texCoord = (position - unity_ProbeVolumeMin.xyz) * unity_ProbeVolumeSizeInv.xyz; + texCoord.x = texCoord.x * 0.25; + float texCoordX = clamp(texCoord.x, 0.5 * unity_ProbeVolumeParams.z, 0.25 - 0.5 * unity_ProbeVolumeParams.z); + texCoord.x = texCoordX; + SHAr = LIL_SAMPLE_3D(unity_ProbeVolumeSH, samplerunity_ProbeVolumeSH, texCoord); + texCoord.x = texCoordX + 0.25; + SHAg = LIL_SAMPLE_3D(unity_ProbeVolumeSH, samplerunity_ProbeVolumeSH, texCoord); + texCoord.x = texCoordX + 0.5; + SHAb = LIL_SAMPLE_3D(unity_ProbeVolumeSH, samplerunity_ProbeVolumeSH, texCoord); + } + #endif + float3 res; + res.r = dot(SHAr,normalWS); + res.g = dot(SHAg,normalWS); + res.b = dot(SHAb,normalWS); + float4 vB = normalWS.xyzz * normalWS.yzzx; + res.r += dot(unity_SHBr,vB); + res.g += dot(unity_SHBg,vB); + res.b += dot(unity_SHBb,vB); + res += unity_SHC.rgb * (normalWS.x * normalWS.x - normalWS.y * normalWS.y); + #ifdef LIL_COLORSPACE_GAMMA + res = lilLinearToSRGB(res); + #endif + return res; +} + +float3 lilShadeSH9LPPV(float3 normalWS, float3 positionWS) +{ + return lilShadeSH9LPPV(float4(normalWS,1.0), positionWS); +} + +float3 lilGetSHToon() +{ + return lilShadeSH9(lilGetLightDirectionForSH9() * 0.666666); +} + +float3 lilGetSHToon(float3 positionWS) +{ + return lilShadeSH9LPPV(lilGetLightDirectionForSH9() * 0.666666, positionWS); +} + +float3 lilGetSHToonMin() +{ + return lilShadeSH9(-lilGetLightDirectionForSH9() * 0.666666); +} + +float3 lilGetSHToonMin(float3 positionWS) +{ + return lilShadeSH9LPPV(-lilGetLightDirectionForSH9() * 0.666666, positionWS); +} + +void lilGetToonSHDouble(float3 lightDirection, out float3 shMax, out float3 shMin) +{ + float3 N = lightDirection * 0.666666; + float4 vB = N.xyzz * N.yzzx; + // L0 L2 + float3 res = float3(unity_SHAr.w,unity_SHAg.w,unity_SHAb.w); + res.r += dot(unity_SHBr, vB); + res.g += dot(unity_SHBg, vB); + res.b += dot(unity_SHBb, vB); + res += unity_SHC.rgb * (N.x * N.x - N.y * N.y); + // L1 + float3 l1; + l1.r = dot(unity_SHAr.rgb, N); + l1.g = dot(unity_SHAg.rgb, N); + l1.b = dot(unity_SHAb.rgb, N); + shMax = res + l1; + shMin = res - l1; + #ifdef LIL_COLORSPACE_GAMMA + shMax = lilLinearToSRGB(shMax); + shMin = lilLinearToSRGB(shMin); + #endif +} + +void lilGetToonSHDoubleLPPV(float3 lightDirection, float3 positionWS, out float3 shMax, out float3 shMin) +{ + float4 SHAr = unity_SHAr; + float4 SHAg = unity_SHAg; + float4 SHAb = unity_SHAb; + #if defined(LIL_USE_LPPV) + if(unity_ProbeVolumeParams.x == 1.0) + { + float3 position = (unity_ProbeVolumeParams.y == 1.0) ? lilOptMul(unity_ProbeVolumeWorldToObject, positionWS).xyz : positionWS; + float3 texCoord = (position - unity_ProbeVolumeMin.xyz) * unity_ProbeVolumeSizeInv.xyz; + texCoord.x = texCoord.x * 0.25; + float texCoordX = clamp(texCoord.x, 0.5 * unity_ProbeVolumeParams.z, 0.25 - 0.5 * unity_ProbeVolumeParams.z); + texCoord.x = texCoordX; + SHAr = LIL_SAMPLE_3D(unity_ProbeVolumeSH, samplerunity_ProbeVolumeSH, texCoord); + texCoord.x = texCoordX + 0.25; + SHAg = LIL_SAMPLE_3D(unity_ProbeVolumeSH, samplerunity_ProbeVolumeSH, texCoord); + texCoord.x = texCoordX + 0.5; + SHAb = LIL_SAMPLE_3D(unity_ProbeVolumeSH, samplerunity_ProbeVolumeSH, texCoord); + } + #endif + float3 N = lightDirection * 0.666666; + float4 vB = N.xyzz * N.yzzx; + // L0 L2 + float3 res = float3(SHAr.w,SHAg.w,SHAb.w); + res.r += dot(unity_SHBr, vB); + res.g += dot(unity_SHBg, vB); + res.b += dot(unity_SHBb, vB); + res += unity_SHC.rgb * (N.x * N.x - N.y * N.y); + // L1 + float3 l1; + l1.r = dot(SHAr.rgb, N); + l1.g = dot(SHAg.rgb, N); + l1.b = dot(SHAb.rgb, N); + shMax = res + l1; + shMin = res - l1; + #ifdef LIL_COLORSPACE_GAMMA + shMax = lilLinearToSRGB(shMax); + shMin = lilLinearToSRGB(shMin); + #endif +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Lighting +float3 lilGetLightColor() +{ + return LIL_MAINLIGHT_COLOR + lilGetSHToon(); +} + +float3 lilGetLightColor(float3 positionWS) +{ + return LIL_MAINLIGHT_COLOR + lilGetSHToon(positionWS); +} + +float3 lilGetIndirLightColor() +{ + return saturate(lilGetSHToonMin()); +} + +float3 lilGetIndirLightColor(float3 positionWS) +{ + return saturate(lilGetSHToonMin(positionWS)); +} + +void lilGetLightColorDouble(out float3 lightColor, out float3 indLightColor) +{ + float3 shMax, shMin; + lilGetToonSHDouble(lilGetLightDirectionForSH9(), shMax, shMin); + lightColor = LIL_MAINLIGHT_COLOR + shMax; + indLightColor = saturate(shMin); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Geometric Specular Antialiasing +void GSAA(inout float roughness, float3 N, float strength) +{ + float3 dx = abs(ddx(N)); + float3 dy = abs(ddy(N)); + float dxy = max(dot(dx,dx), dot(dy,dy)); + float roughnessGSAA = dxy / (dxy * 5 + 0.002) * strength; + roughness = max(roughness, roughnessGSAA); +} + +void GSAAForSmoothness(inout float smoothness, float3 N, float strength) +{ + float roughness = 0; + GSAA(roughness, N, strength); + smoothness = min(smoothness, saturate(1-roughness)); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Specular +float3 lilFresnelTerm(float3 F0, float cosA) +{ + float a = 1.0-cosA; + return F0 + (1-F0) * a * a * a * a * a; +} + +float3 lilFresnelLerp(float3 F0, float3 F90, float cosA) +{ + float a = 1.0-cosA; + return lerp(F0, F90, a * a * a * a * a); +} + +float3 lilGetAnisotropyNormalWS(float3 normalWS, float3 anisoTangentWS, float3 anisoBitangentWS, float3 viewDirection, float anisotropy) +{ + float3 anisoDirectionWS = anisotropy > 0.0 ? anisoBitangentWS : anisoTangentWS; + anisoDirectionWS = lilOrthoNormalize(viewDirection, anisoDirectionWS); + return normalize(lerp(normalWS, anisoDirectionWS, abs(anisotropy))); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Reflection +float3 lilCustomReflection(TEXTURECUBE(tex), float4 hdr, float3 viewDirection, float3 normalDirection, float perceptualRoughness) +{ + float mip = perceptualRoughness * (10.2 - 4.2 * perceptualRoughness); + float3 refl = reflect(-viewDirection, normalDirection); + return lilDecodeHDR(LIL_SAMPLE_CUBE_LOD(tex, lil_sampler_linear_repeat, refl, mip), hdr); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Glitter +float4 lilVoronoi(float2 pos, out float2 nearoffset, float scaleRandomize) +{ + #if defined(SHADER_API_D3D9) || defined(SHADER_API_D3D11_9X) + #define M1 46203.4357 + #define M2 21091.5327 + #define M3 35771.1966 + float2 q = trunc(pos); + float4 q2 = float4(q.x, q.y, q.x+1, q.y+1); + float3 noise0 = frac(sin(dot(q2.xy,float2(12.9898,78.233))) * float3(M1, M2, M3)); + float3 noise1 = frac(sin(dot(q2.zy,float2(12.9898,78.233))) * float3(M1, M2, M3)); + float3 noise2 = frac(sin(dot(q2.xw,float2(12.9898,78.233))) * float3(M1, M2, M3)); + float3 noise3 = frac(sin(dot(q2.zw,float2(12.9898,78.233))) * float3(M1, M2, M3)); + #undef M1 + #undef M2 + #undef M3 + #else + float3 noise0, noise1, noise2, noise3; + lilHashRGB4(pos, noise0, noise1, noise2, noise3); + #endif + + // Get the nearest position + float4 fracpos = frac(pos).xyxy + float4(0.5,0.5,-0.5,-0.5); + float4 dist4 = float4(lilNsqDistance(fracpos.xy,noise0.xy), lilNsqDistance(fracpos.zy,noise1.xy), lilNsqDistance(fracpos.xw,noise2.xy), lilNsqDistance(fracpos.zw,noise3.xy)); + dist4 = lerp(dist4, dist4 / max(float4(noise0.z, noise1.z, noise2.z, noise3.z), 0.001), scaleRandomize); + + float3 nearoffset0 = dist4.x < dist4.y ? float3(0,0,dist4.x) : float3(1,0,dist4.y); + float3 nearoffset1 = dist4.z < dist4.w ? float3(0,1,dist4.z) : float3(1,1,dist4.w); + nearoffset = nearoffset0.z < nearoffset1.z ? nearoffset0.xy : nearoffset1.xy; + + float4 near0 = dist4.x < dist4.y ? float4(noise0,dist4.x) : float4(noise1,dist4.y); + float4 near1 = dist4.z < dist4.w ? float4(noise2,dist4.z) : float4(noise3,dist4.w); + return near0.w < near1.w ? near0 : near1; +} + +float3 lilCalcGlitter(float2 uv, float3 normalDirection, float3 viewDirection, float3 cameraDirection, float3 lightDirection, float4 glitterParams1, float4 glitterParams2, float glitterPostContrast, float glitterSensitivity, float glitterScaleRandomize, uint glitterAngleRandomize, bool glitterApplyShape, TEXTURE2D(glitterShapeTex), float4 glitterShapeTex_ST, float4 glitterAtras) +{ + // glitterParams1 + // x: Scale, y: Scale, z: Size, w: Contrast + // glitterParams2 + // x: Speed, y: Angle, z: Light Direction, w: + + #define GLITTER_DEBUG_MODE 0 + #define GLITTER_MIPMAP 1 + #define GLITTER_ANTIALIAS 1 + + #if GLITTER_MIPMAP == 1 + float2 pos = uv * glitterParams1.xy; + float2 dd = fwidth(pos); + float factor = frac(sin(dot(floor(pos/floor(dd + 3.0)),float2(12.9898,78.233))) * 46203.4357) + 0.5; + float2 factor2 = floor(dd + factor * 0.5); + pos = pos/max(1.0,factor2) + glitterParams1.xy * factor2; + #else + float2 pos = uv * glitterParams1.xy + glitterParams1.xy; + #endif + float2 nearoffset; + float4 near = lilVoronoi(pos, nearoffset, glitterScaleRandomize); + + + #if GLITTER_DEBUG_MODE == 1 + // Voronoi + return near.x; + #else + // Glitter + float3 glitterNormal = abs(frac(near.xyz*14.274 + _Time.x * glitterParams2.x) * 2.0 - 1.0); + glitterNormal = normalize(glitterNormal * 2.0 - 1.0); + float glitter = dot(glitterNormal, cameraDirection); + glitter = abs(frac(glitter * glitterSensitivity + glitterSensitivity) - 0.5) * 4.0 - 1.0; + glitter = saturate(1.0 - (glitter * glitterParams1.w + glitterParams1.w)); + glitter = pow(glitter, glitterPostContrast); + // Circle + #if GLITTER_ANTIALIAS == 1 + glitter *= saturate((glitterParams1.z-near.w) / fwidth(near.w)); + #else + glitter = near.w < glitterParams1.z ? glitter : 0.0; + #endif + // Angle + float3 halfDirection = normalize(viewDirection + lightDirection * glitterParams2.z); + float nh = saturate(dot(normalDirection, halfDirection)); + glitter = saturate(glitter * saturate(nh * glitterParams2.y + 1.0 - glitterParams2.y)); + // Random Color + float3 glitterColor = glitter - glitter * frac(near.xyz*278.436) * glitterParams2.w; + // Shape + #if defined(LIL_FEATURE_GlitterShapeTex) + if(glitterApplyShape) + { + float2 maskUV = pos - floor(pos) - nearoffset + 0.5 - near.xy; + maskUV = maskUV / glitterParams1.z * glitterShapeTex_ST.xy + glitterShapeTex_ST.zw; + if(glitterAngleRandomize) + { + float si,co; + sincos(near.z * 785.238, si, co); + maskUV = float2( + maskUV.x * co - maskUV.y * si, + maskUV.x * si + maskUV.y * co + ); + } + float randomScale = lerp(1.0, 1.0 / sqrt(max(near.z, 0.001)), glitterScaleRandomize); + maskUV = maskUV * randomScale + 0.5; + bool clamp = maskUV.x == saturate(maskUV.x) && maskUV.y == saturate(maskUV.y); + maskUV = (maskUV + floor(near.xy * glitterAtras.xy)) / glitterAtras.xy; + float2 mipfactor = 0.125 / glitterParams1.z * glitterAtras.xy * glitterShapeTex_ST.xy * randomScale; + float4 shapeTex = LIL_SAMPLE_2D_GRAD(glitterShapeTex, lil_sampler_linear_clamp, maskUV, abs(ddx(pos)) * mipfactor.x, abs(ddy(pos)) * mipfactor.y); + shapeTex.a = clamp ? shapeTex.a : 0; + glitterColor *= shapeTex.rgb * shapeTex.a; + } + #endif + return glitterColor; + #endif +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Tessellation +float lilCalcEdgeTessFactor(float3 wpos0, float3 wpos1, float edgeLen) +{ + float dist = distance(0.5 * (wpos0+wpos1), _WorldSpaceCameraPos.xyz); + return max(distance(wpos0, wpos1) * LIL_SCREENPARAMS.y / (edgeLen * dist), 1.0); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// IDMask +// Do not use float2x4 because it is not supported in ES2.0 +float4x4 IDToMeshMask(uint vertexID, int indices[8]) +{ + /* + return float2x4( + (vertexID >= indices[0]) && (vertexID < indices[1]), + (vertexID >= indices[1]) && (vertexID < indices[2]), + (vertexID >= indices[2]) && (vertexID < indices[3]), + (vertexID >= indices[3]) && (vertexID < indices[4]), + (vertexID >= indices[4]) && (vertexID < indices[5]), + (vertexID >= indices[5]) && (vertexID < indices[6]), + (vertexID >= indices[6]) && (vertexID < indices[7]), + (vertexID >= indices[7]) + ); + */ + + float a0 = (int)vertexID - indices[0]; + float a1 = (int)vertexID - indices[1]; + float a2 = (int)vertexID - indices[2]; + float a3 = (int)vertexID - indices[3]; + float a4 = (int)vertexID - indices[4]; + float a5 = (int)vertexID - indices[5]; + float a6 = (int)vertexID - indices[6]; + float a7 = (int)vertexID - indices[7]; + + float4 b0 = + float4(saturate(a0+1), saturate(a1+1), saturate(a2+1), saturate(a3+1)) * + float4(saturate(-a1), saturate(-a2), saturate(-a3), saturate(-a4)); + float4 b1 = + float4(saturate(a4+1), saturate(a5+1), saturate(a6+1), saturate(a7+1)) * + float4(saturate(-a5), saturate(-a6), saturate(-a7), 1); + return float4x4(b0,b1,float4(0,0,0,0),float4(0,0,0,0)); +} + +float IDToMeshNum(uint vertexID, int indices[8]) +{ + float4x4 masks = IDToMeshMask(vertexID,indices); + return dot(masks[0],float4(1,2,3,4)) + dot(masks[1],float4(5,6,7,8)); +} + +bool IDMask(uint maskInput, bool isBitmask, int indices[8], float flags[8]) +{ + if (isBitmask) { + uint enableMask = dot( + round(float4(flags[0], flags[1], flags[2], flags[3])), + float4(1, 2, 4, 8) + ) + dot( + round(float4(flags[4], flags[5], flags[6], flags[7])), + float4(16, 32, 64, 128) + ); + // If only some if the bits flagged against this mask are 1, return 0; this ensures that we only hide a vertex + // if all of the "parts" it belongs to are hidden. This is useful when dealing with "boundary" polygons between + // two hidable areas, where we don't want to move only some of the vertices of the polygon. + return maskInput && (enableMask & maskInput) == maskInput; + } else { + float4x4 masks = IDToMeshMask(maskInput,indices); + return dot(masks[0],float4(flags[0],flags[1],flags[2],flags[3])) + dot(masks[1],float4(flags[4],flags[5],flags[6],flags[7])); + } +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl.meta new file mode 100644 index 00000000..89dd6289 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_functions.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c92aa095988162843aa4bb2835dcc842 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl new file mode 100644 index 00000000..1f5378a3 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl @@ -0,0 +1,272 @@ +#ifndef LIL_FUNCTIONS_THIRDPARTY_INCLUDED +#define LIL_FUNCTIONS_THIRDPARTY_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Inverse trigonometric functions GPU optimization for AMD GCN architecture +// https://seblagarde.wordpress.com/2014/12/01/inverse-trigonometric-functions-gpu-optimization-for-amd-gcn-architecture/ +float lilAcos(float x) +{ + #if 0 + float res = sqrt(1.0 - abs(x)) * LIL_HALF_PI; + return (x >= 0.0) ? res : LIL_PI - res; + #else + float ox = abs(x); + float res = -0.156583 * ox + LIL_HALF_PI; + res *= sqrt(1.0 - ox); + return (x >= 0.0) ? res : LIL_PI - res; + #endif +} + +float lilAsin(float x) +{ + return LIL_HALF_PI - lilAcos(x); +} + +float lilAtanPos(float x) +{ + #if 1 + float t0 = (x < 1.0f) ? x : 1.0f / x; + float t1 = (-0.269408 * t0 + 1.05863) * t0; + return (x < 1.0f) ? t1 : LIL_HALF_PI - t1; + #else + float t0 = (x < 1.0) ? x : 1.0 / x; + float t1 = t0 * t0; + float poly = 0.0872929; + poly = -0.301895 + poly * t1; + poly = 1.0f + poly * t1; + poly = poly * t0; + return (x < 1.0) ? poly : LIL_HALF_PI - poly; + #endif +} + +float lilAtan(float x) +{ + float t0 = lilAtanPos(abs(x)); + return (x < 0.0) ? -t0 : t0; +} + +float lilAtan(float x, float y) +{ + return lilAtan(x/y) + LIL_PI * (y<0) * (x<0?-1:1); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// sRGB Approximations for HLSL +// http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html?m=1 +float3 lilLinearToSRGB(float3 col) +{ + return saturate(1.055 * pow(abs(col), 0.416666667) - 0.055); +} + +float3 lilSRGBToLinear(float3 col) +{ + return col * (col * (col * 0.305306011 + 0.682171111) + 0.012522878); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Simplest Fastest 2D Hash +// https://www.shadertoy.com/view/MdcfDj +void lilHashRGB4(float2 pos, out float3 noise0, out float3 noise1, out float3 noise2, out float3 noise3) +{ + // Hash + // https://www.shadertoy.com/view/MdcfDj + #define M1 1597334677U + #define M2 3812015801U + #define M3 2912667907U + uint2 q = (uint2)pos; + uint4 q2 = uint4(q.x, q.y, q.x+1, q.y+1) * uint4(M1, M2, M1, M2); + uint3 n0 = (q2.x ^ q2.y) * uint3(M1, M2, M3); + uint3 n1 = (q2.z ^ q2.y) * uint3(M1, M2, M3); + uint3 n2 = (q2.x ^ q2.w) * uint3(M1, M2, M3); + uint3 n3 = (q2.z ^ q2.w) * uint3(M1, M2, M3); + noise0 = float3(n0) * (1.0/float(0xffffffffU)); + noise1 = float3(n1) * (1.0/float(0xffffffffU)); + noise2 = float3(n2) * (1.0/float(0xffffffffU)); + noise3 = float3(n3) * (1.0/float(0xffffffffU)); + #undef M1 + #undef M2 + #undef M3 +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Udon AudioLink +// https://github.com/llealloo/vrc-udon-audio-link +bool lilCheckAudioLink() +{ + #if defined(LIL_FEATURE_AUDIOLINK) + #if defined(LIL_LWTEX) + return _AudioTexture_TexelSize.z > 16; + #else + int width, height; + _AudioTexture.GetDimensions(width, height); + return width > 16; + #endif + #else + return false; + #endif +} + +//------------------------------------------------------------------------------------------------------------------------------ +// LTCGI +// https://github.com/PiMaker/ltcgi +#if defined(LIL_FEATURE_LTCGI) +float3 NearestPointOnLine(float3 p, float3 pos1, float3 pos2) +{ + float3 v = pos2 - pos1; + float3 w = p - pos1; + float c1 = dot(w, v); + float c2 = dot(v, v); + float b = c1 / c2; + float3 pb = pos1 + b * v; + if(c1 <= 0.0) return pos1; + if(c2 <= c1) return pos2; + return pb; +} + +float3 NearestPointOnQuad(float3 p, float3 v[4]) +{ + float3 v1 = NearestPointOnLine(p, v[0], v[1]); + float3 v2 = NearestPointOnLine(p, v[2], v[3]); + return NearestPointOnLine(p, v1, v2); +} + +#define Sample(smp,uv) SampleLevel(smp,uv,0) +#include "Packages/at.pimaker.ltcgi/Shaders/LTCGI_structs.cginc" +struct lil_ltcgi_struct +{ + float3 diff; + float3 spec; + float3 L; + float3 N; + float3 V; +}; +float lilLTCGIAttenuation(inout lil_ltcgi_struct ltcgi, in ltcgi_output output) +{ + float3 C = (output.input.Lw[1] + output.input.Lw[0] + output.input.Lw[3] + output.input.Lw[0]) * 0.25; + float3 P = NearestPointOnQuad(float3(0,0,0), output.input.Lw); + float3 N = normalize(cross(output.input.Lw[1]-output.input.Lw[0], output.input.Lw[3]-output.input.Lw[0])); + float3 L = normalize(lerp(P, C, 0.3)); + float dist = lerp(length(P), length(C), 0.3) + 1; + float rim = saturate(1 - abs(dot(ltcgi.N,ltcgi.V)) * 2 + dot(ltcgi.N,L)); + float atten = abs(dot(N, normalize(P))) / (pow(dist, 3)); + atten *= lerp(rim, 1, saturate(dot(ltcgi.V,L) * 0.5 + 0.5)); + atten = saturate(atten); + ltcgi.L += atten * dot(output.color,0.333333) * L; + return atten; +} +void callback_diffuse(inout lil_ltcgi_struct ltcgi, in ltcgi_output output) { + float atten = lilLTCGIAttenuation(ltcgi, output); + ltcgi.diff += atten * output.color * 2; + //ltcgi.diff += output.intensity * output.color; +} +void callback_specular(inout lil_ltcgi_struct ltcgi, in ltcgi_output output) { + float atten = lilLTCGIAttenuation(ltcgi, output); + ltcgi.spec += atten * output.color; + //ltcgi.spec += output.intensity * output.color; +} +#define LTCGI_V2_CUSTOM_INPUT lil_ltcgi_struct +#define LTCGI_V2_DIFFUSE_CALLBACK callback_diffuse +#define LTCGI_V2_SPECULAR_CALLBACK callback_specular +#include "Packages/at.pimaker.ltcgi/Shaders/LTCGI.cginc" + +void lilLTCGI(inout lilLightData o, float3 positionWS, float3 N, float3 V, float2 uv1) +{ + lil_ltcgi_struct ltcgi = (lil_ltcgi_struct)0; + ltcgi.N = N; + ltcgi.V = V; + LTCGI_Contribution(ltcgi, positionWS, N, V, 1, uv1); + o.lightColor += ltcgi.diff + ltcgi.spec; + //o.lightDirection = normalize(o.lightDirection * dot(o.lightColor+0.001,0.333333) + ltcgi.L); +} +#undef Sample +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// GTAvaCrypt +// https://github.com/rygo6/GTAvaCrypt/blob/master/LICENSE +#if defined(LIL_FEATURE_ENCRYPTION) +#include "GTModelDecode.cginc" +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// UDIM Discard (UV Tile Discard, original implementation by Razgriz for Poiyomi) +// https://github.com/poiyomi/PoiyomiToonShader/blob/master/LICENSE +bool lilUDIMDiscard( + float2 uv0, + float2 uv1, + float2 uv2, + float2 uv3, + float udimDiscardCompile, + float udimDiscardMode, + float udimDiscardUV, + float udimDiscardRow3_0, + float udimDiscardRow3_1, + float udimDiscardRow3_2, + float udimDiscardRow3_3, + float udimDiscardRow2_0, + float udimDiscardRow2_1, + float udimDiscardRow2_2, + float udimDiscardRow2_3, + float udimDiscardRow1_0, + float udimDiscardRow1_1, + float udimDiscardRow1_2, + float udimDiscardRow1_3, + float udimDiscardRow0_0, + float udimDiscardRow0_1, + float udimDiscardRow0_2, + float udimDiscardRow0_3 +) +{ + // Branchless (inspired by s-ilent) + float2 udim = 0; + // Select UV + udim += (uv0 * (udimDiscardUV == 0)); + udim += (uv1 * (udimDiscardUV == 1)); + udim += (uv2 * (udimDiscardUV == 2)); + udim += (uv3 * (udimDiscardUV == 3)); + + float isDiscarded = 0; + float4 xMask = float4( (udim.x >= 0 && udim.x < 1), + (udim.x >= 1 && udim.x < 2), + (udim.x >= 2 && udim.x < 3), + (udim.x >= 3 && udim.x < 4)); + + isDiscarded += (udim.y >= 0 && udim.y < 1) * dot(float4(udimDiscardRow0_0, udimDiscardRow0_1, udimDiscardRow0_2, udimDiscardRow0_3), xMask); + isDiscarded += (udim.y >= 1 && udim.y < 2) * dot(float4(udimDiscardRow1_0, udimDiscardRow1_1, udimDiscardRow1_2, udimDiscardRow1_3), xMask); + isDiscarded += (udim.y >= 2 && udim.y < 3) * dot(float4(udimDiscardRow2_0, udimDiscardRow2_1, udimDiscardRow2_2, udimDiscardRow2_3), xMask); + isDiscarded += (udim.y >= 3 && udim.y < 4) * dot(float4(udimDiscardRow3_0, udimDiscardRow3_1, udimDiscardRow3_2, udimDiscardRow3_3), xMask); + + isDiscarded *= any(float4(udim.y >= 0, udim.y < 4, udim.x >= 0, udim.x < 4)); // never discard outside 4x4 grid in pos coords + + // Use a threshold so that there's some room for animations to be close to 0, but not exactly 0 + const float threshold = 0.001; + return isDiscarded > threshold; +} + +#define LIL_CHECK_UDIMDISCARD(i) lilUDIMDiscard( \ + i.uv0.xy, \ + i.uv1.xy, \ + i.uv2.xy, \ + i.uv3.xy, \ + _UDIMDiscardCompile, \ + _UDIMDiscardMode, \ + _UDIMDiscardUV, \ + _UDIMDiscardRow3_0, \ + _UDIMDiscardRow3_1, \ + _UDIMDiscardRow3_2, \ + _UDIMDiscardRow3_3, \ + _UDIMDiscardRow2_0, \ + _UDIMDiscardRow2_1, \ + _UDIMDiscardRow2_2, \ + _UDIMDiscardRow2_3, \ + _UDIMDiscardRow1_0, \ + _UDIMDiscardRow1_1, \ + _UDIMDiscardRow1_2, \ + _UDIMDiscardRow1_3, \ + _UDIMDiscardRow0_0, \ + _UDIMDiscardRow0_1, \ + _UDIMDiscardRow0_2, \ + _UDIMDiscardRow0_3 \ +) + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl.meta new file mode 100644 index 00000000..4bbda240 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_functions_thirdparty.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b7e02b1c541e17e438d1bf1e67bd9282 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl new file mode 100644 index 00000000..3a9fe7d5 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl @@ -0,0 +1,920 @@ +#ifndef LIL_INPUT_INCLUDED +#define LIL_INPUT_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Variables from Unity +#if !defined(SHADER_API_GLES) + TEXTURE3D(_DitherMaskLOD); +#endif + +SAMPLER(lil_sampler_trilinear_repeat); +SAMPLER(lil_sampler_linear_clamp); +#define sampler_linear_clamp lil_sampler_linear_clamp +#define sampler_trilinear_clamp lil_sampler_linear_clamp +#define sampler_linear_repeat lil_sampler_trilinear_repeat +#define sampler_trilinear_repeat lil_sampler_trilinear_repeat + +#define lil_sampler_trilinear_clamp lil_sampler_linear_clamp +#define lil_sampler_linear_repeat lil_sampler_trilinear_repeat + +#if defined(LIL_BRP) + TEXTURE2D_SCREEN(_CameraDepthTexture); + TEXTURE2D_SCREEN(_lilBackgroundTexture); + TEXTURE2D_SCREEN(_GrabTexture); + float4 _lilBackgroundTexture_TexelSize; + #define LIL_GET_DEPTH_TEX_CS(uv) LIL_SAMPLE_SCREEN_CS(_CameraDepthTexture, lilCameraDepthTexel(uv)) + #define LIL_TO_LINEARDEPTH(z,uv) lilLinearEyeDepth(z, uv) + #define LIL_GET_BG_TEX(uv,lod) max(LIL_SAMPLE_SCREEN(_lilBackgroundTexture, lil_sampler_linear_clamp, uv),0) + #define LIL_GET_GRAB_TEX(uv,lod) max(LIL_SAMPLE_SCREEN(_GrabTexture, lil_sampler_linear_clamp, uv),0) + #define LIL_ENABLED_DEPTH_TEX IsScreenTex(_CameraDepthTexture) +#elif defined(LIL_HDRP) + #define LIL_GET_DEPTH_TEX_CS(uv) SampleCameraDepth(uv/LIL_SCREENPARAMS.xy) + #define LIL_TO_LINEARDEPTH(z,uv) LinearEyeDepth(z, _ZBufferParams) + #define LIL_GET_BG_TEX(uv,lod) SampleCameraColor(uv,lod) + #define LIL_GET_GRAB_TEX(uv,lod) SampleCameraColor(uv,lod) + #define LIL_ENABLED_DEPTH_TEX IsScreenTex(_CameraDepthTexture) +#else + TEXTURE2D_SCREEN(_CameraDepthTexture); + TEXTURE2D_SCREEN(_CameraOpaqueTexture); + #define LIL_GET_DEPTH_TEX_CS(uv) LIL_SAMPLE_SCREEN_CS(_CameraDepthTexture, uv) + #define LIL_TO_LINEARDEPTH(z,uv) LinearEyeDepth(z, _ZBufferParams) + #define LIL_GET_BG_TEX(uv,lod) LIL_SAMPLE_SCREEN_LOD(_CameraOpaqueTexture, lil_sampler_linear_clamp, uv, lod) + #define LIL_GET_GRAB_TEX(uv,lod) LIL_SAMPLE_SCREEN_LOD(_CameraOpaqueTexture, lil_sampler_linear_clamp, uv, lod) + #define LIL_ENABLED_DEPTH_TEX IsScreenTex(_CameraDepthTexture) +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Texture Exists +#if !defined(LIL_FEATURE_MainTex) + #define LIL_FEATURE_MainTex +#endif +#if !defined(LIL_FEATURE_Main2ndTex) + #define LIL_FEATURE_Main2ndTex +#endif +#if !defined(LIL_FEATURE_Main3rdTex) + #define LIL_FEATURE_Main3rdTex +#endif +#if !defined(LIL_FEATURE_DitherTex) + #define LIL_FEATURE_DitherTex +#endif +#if defined(LIL_LITE) + #if !defined(LIL_FEATURE_TriMask) + #define LIL_FEATURE_TriMask + #endif + #if !defined(LIL_FEATURE_MainTex) + #define LIL_FEATURE_MainTex + #endif + #if !defined(LIL_FEATURE_ShadowColorTex) + #define LIL_FEATURE_ShadowColorTex + #endif + #if !defined(LIL_FEATURE_Shadow2ndColorTex) + #define LIL_FEATURE_Shadow2ndColorTex + #endif + #if !defined(LIL_FEATURE_MatCapTex) + #define LIL_FEATURE_MatCapTex + #endif + #if !defined(LIL_FEATURE_EmissionMap) + #define LIL_FEATURE_EmissionMap + #endif + #if !defined(LIL_FEATURE_OutlineTex) + #define LIL_FEATURE_OutlineTex + #endif + #if !defined(LIL_FEATURE_OutlineWidthMask) + #define LIL_FEATURE_OutlineWidthMask + #endif +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Input + +// ST x:scale y:scale z:offset w:offset +// ScrollRotate x:scroll y:scroll z:angle w:rotation +// Blink x:strength y:type z:speed w:offset +// HSVG x:hue y:saturation z:value w:gamma +// BlendMode 0:normal 1:add 2:screen 3:multiply + +// bool does not work in cbuffer +#if !defined(lilBool) + #define lilBool uint +#endif + +#ifndef LIL_INPUT_BASE_INCLUDED + +CBUFFER_START(UnityPerMaterial) +#if defined(LIL_LITE) + float4 _LightDirectionOverride; + float4 _Color; + float4 _MainTex_ST; + float4 _MainTex_ScrollRotate; + float4 _ShadowBorderColor; + float4 _MatCapTex_ST; + float4 _MatCapBlendUV1; + float4 _RimColor; + float4 _EmissionColor; + float4 _EmissionBlink; + float4 _EmissionMap_ST; + float4 _EmissionMap_ScrollRotate; + float4 _OutlineColor; + float4 _OutlineTex_ST; + float4 _OutlineTex_ScrollRotate; + float _AsUnlit; + float _Cutoff; + float _SubpassCutoff; + float _FlipNormal; + float _ShiftBackfaceUV; + float _VertexLightStrength; + float _LightMinLimit; + float _LightMaxLimit; + float _MonochromeLighting; + float _AAStrength; + #if defined(LIL_BRP) + float _AlphaBoostFA; + #endif + #if defined(LIL_HDRP) + float _BeforeExposureLimit; + float _lilDirectionalLightStrength; + #endif + float _BackfaceForceShadow; + float _ShadowBorder; + float _ShadowBlur; + float _Shadow2ndBorder; + float _Shadow2ndBlur; + float _ShadowEnvStrength; + float _ShadowBorderRange; + float _MatCapVRParallaxStrength; + float _RimBorder; + float _RimBlur; + float _RimFresnelPower; + float _RimShadowMask; + float _lilShadowCasterBias; + float _OutlineWidth; + float _OutlineEnableLighting; + float _OutlineFixWidth; + float _OutlineZBias; + uint _Cull; + uint _OutlineCull; + uint _EmissionMap_UVMode; + uint _OutlineVertexR2Width; + lilBool _Invisible; + lilBool _UseShadow; + lilBool _UseMatCap; + lilBool _MatCapMul; + lilBool _MatCapPerspective; + lilBool _MatCapZRotCancel; + lilBool _UseRim; + lilBool _UseEmission; + lilBool _OutlineDeleteMesh; +#elif defined(LIL_FAKESHADOW) + float4 _Color; + float4 _MainTex_ST; + float4 _FakeShadowVector; + #if defined(LIL_FEATURE_ENCRYPTION) + float4 _Keys; + #endif + lilBool _Invisible; + #if defined(LIL_FEATURE_ENCRYPTION) + lilBool _IgnoreEncryption; + #endif +#elif defined(LIL_BAKER) + float4 _Color; + float4 _MainTex_ST; + float4 _MainTexHSVG; + float4 _Color2nd; + float4 _Main2ndTex_ST; + float4 _Main2ndTex_ScrollRotate; + float4 _Color3rd; + float4 _Main3rdTex_ST; + float4 _Main3rdTex_ScrollRotate; + float _MainGradationStrength; + float _Main2ndTexAngle; + float _Main3rdTexAngle; + float _AlphaMaskScale; + float _AlphaMaskValue; + float _AAStrength; + uint _Main2ndTexBlendMode; + uint _Main2ndTex_UVMode; + uint _Main3rdTexBlendMode; + uint _Main3rdTex_UVMode; + uint _AlphaMaskMode; + lilBool _UseMain2ndTex; + lilBool _Main2ndTexIsDecal; + lilBool _Main2ndTexIsLeftOnly; + lilBool _Main2ndTexIsRightOnly; + lilBool _Main2ndTexShouldCopy; + lilBool _Main2ndTexShouldFlipMirror; + lilBool _Main2ndTexShouldFlipCopy; + lilBool _Main2ndTexIsMSDF; + lilBool _UseMain3rdTex; + lilBool _Main3rdTexIsDecal; + lilBool _Main3rdTexIsLeftOnly; + lilBool _Main3rdTexIsRightOnly; + lilBool _Main3rdTexShouldCopy; + lilBool _Main3rdTexShouldFlipMirror; + lilBool _Main3rdTexShouldFlipCopy; + lilBool _Main3rdTexIsMSDF; +#elif defined(LIL_MULTI) + float4 _LightDirectionOverride; + float4 _BackfaceColor; + float4 _Color; + float4 _MainTex_ST; + float4 _MainTex_ScrollRotate; + #if defined(LIL_MULTI_INPUTS_MAIN_TONECORRECTION) + float4 _MainTexHSVG; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN2ND) + float4 _Color2nd; + float4 _Main2ndTex_ST; + float4 _Main2ndTex_ScrollRotate; + float4 _Main2ndDistanceFade; + float4 _Main2ndTexDecalAnimation; + float4 _Main2ndTexDecalSubParam; + float4 _Main2ndDissolveMask_ST; + float4 _Main2ndDissolveColor; + float4 _Main2ndDissolveParams; + float4 _Main2ndDissolvePos; + float4 _Main2ndDissolveNoiseMask_ST; + float4 _Main2ndDissolveNoiseMask_ScrollRotate; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN3RD) + float4 _Color3rd; + float4 _Main3rdTex_ST; + float4 _Main3rdTex_ScrollRotate; + float4 _Main3rdDistanceFade; + float4 _Main3rdTexDecalAnimation; + float4 _Main3rdTexDecalSubParam; + float4 _Main3rdDissolveMask_ST; + float4 _Main3rdDissolveColor; + float4 _Main3rdDissolveParams; + float4 _Main3rdDissolvePos; + float4 _Main3rdDissolveNoiseMask_ST; + float4 _Main3rdDissolveNoiseMask_ScrollRotate; + #endif + #if defined(LIL_MULTI_INPUTS_SHADOW) + float4 _ShadowColor; + float4 _Shadow2ndColor; + float4 _Shadow3rdColor; + float4 _ShadowBorderColor; + float4 _ShadowAOShift; + float4 _ShadowAOShift2; + #endif + #if defined(LIL_MULTI_INPUTS_RIMSHADE) + float4 _RimShadeColor; + #endif + #if defined(LIL_MULTI_INPUTS_BACKLIGHT) + float4 _BacklightColor; + float4 _BacklightColorTex_ST; + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION) + float4 _EmissionColor; + float4 _EmissionBlink; + float4 _EmissionMap_ST; + float4 _EmissionMap_ScrollRotate; + float4 _EmissionBlendMask_ST; + float4 _EmissionBlendMask_ScrollRotate; + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION_2ND) + float4 _Emission2ndColor; + float4 _Emission2ndBlink; + float4 _Emission2ndMap_ST; + float4 _Emission2ndMap_ScrollRotate; + float4 _Emission2ndBlendMask_ST; + float4 _Emission2ndBlendMask_ScrollRotate; + #endif + #if defined(LIL_MULTI_INPUTS_NORMAL) + float4 _BumpMap_ST; + #endif + #if defined(LIL_MULTI_INPUTS_NORMAL_2ND) + float4 _Bump2ndMap_ST; + float4 _Bump2ndScaleMask_ST; + #endif + #if defined(LIL_MULTI_INPUTS_ANISOTROPY) + float4 _AnisotropyTangentMap_ST; + float4 _AnisotropyScaleMask_ST; + float4 _AnisotropyShiftNoiseMask_ST; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) + float4 _ReflectionColor; + float4 _MetallicGlossMap_ST; + float4 _ReflectionColorTex_ST; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_REFRACTION_BLUR2) + float4 _SmoothnessTex_ST; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_GEM) + float4 _ReflectionCubeColor; + float4 _ReflectionCubeTex_HDR; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP) + float4 _MatCapColor; + float4 _MatCapTex_ST; + float4 _MatCapBlendMask_ST; + float4 _MatCapBlendUV1; + float4 _MatCapBumpMap_ST; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP_2ND) + float4 _MatCap2ndColor; + float4 _MatCap2ndTex_ST; + float4 _MatCap2ndBlendMask_ST; + float4 _MatCap2ndBlendUV1; + float4 _MatCap2ndBumpMap_ST; + #endif + #if defined(LIL_MULTI_INPUTS_RIM) + float4 _RimColor; + float4 _RimColorTex_ST; + float4 _RimIndirColor; + #endif + #if defined(LIL_MULTI_INPUTS_GLITTER) + float4 _GlitterColor; + float4 _GlitterColorTex_ST; + float4 _GlitterParams1; + float4 _GlitterParams2; + #if defined(LIL_FEATURE_GlitterShapeTex) + float4 _GlitterShapeTex_ST; + float4 _GlitterAtras; + #endif + #endif + #if defined(LIL_MULTI_INPUTS_DISTANCE_FADE) + float4 _DistanceFade; + float4 _DistanceFadeColor; + float4 _DistanceFadeRimColor; + #endif + #if defined(LIL_MULTI_INPUTS_DITHER) + float4 _DitherTex_TexelSize; + #endif + #if defined(LIL_MULTI_INPUTS_AUDIOLINK) + float4 _AudioLinkMask_ST; + float4 _AudioLinkMask_ScrollRotate; + float4 _AudioLinkDefaultValue; + float4 _AudioLinkUVParams; + float4 _AudioLinkStart; + float4 _AudioLinkVertexUVParams; + float4 _AudioLinkVertexStart; + float4 _AudioLinkVertexStrength; + float4 _AudioLinkLocalMapParams; + #endif + #if defined(LIL_MULTI_INPUTS_DISSOLVE) + float4 _DissolveMask_ST; + float4 _DissolveColor; + float4 _DissolveParams; + float4 _DissolvePos; + float4 _DissolveNoiseMask_ST; + float4 _DissolveNoiseMask_ScrollRotate; + #endif + #if defined(LIL_FEATURE_ENCRYPTION) + float4 _Keys; + #endif + #if defined(LIL_MULTI_INPUTS_OUTLINE) + float4 _OutlineColor; + float4 _OutlineLitColor; + float4 _OutlineTex_ST; + float4 _OutlineTex_ScrollRotate; + float4 _OutlineTexHSVG; + #endif + #if defined(LIL_FUR) + float4 _FurNoiseMask_ST; + float4 _FurVector; + float4 _FurRimColor; + #endif + #if defined(LIL_REFRACTION) || defined(LIL_GEM) + float4 _RefractionColor; + #endif + #if defined(LIL_GEM) + float4 _GemParticleColor; + float4 _GemEnvColor; + #endif + float _AsUnlit; + float _Cutoff; + float _SubpassCutoff; + float _FlipNormal; + float _ShiftBackfaceUV; + float _VertexLightStrength; + float _LightMinLimit; + float _LightMaxLimit; + float _MonochromeLighting; + float _AAStrength; + #if defined(LIL_BRP) + float _AlphaBoostFA; + #endif + #if defined(LIL_HDRP) + float _BeforeExposureLimit; + float _lilDirectionalLightStrength; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN_TONECORRECTION) + float _MainGradationStrength; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN2ND) + float _Main2ndTexAngle; + float _Main2ndEnableLighting; + float _Main2ndDissolveNoiseStrength; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN3RD) + float _Main3rdTexAngle; + float _Main3rdEnableLighting; + float _Main3rdDissolveNoiseStrength; + #endif + #if defined(LIL_MULTI_INPUTS_ALPHAMASK) + float4 _AlphaMask_ST; + float _AlphaMaskScale; + float _AlphaMaskValue; + #endif + float _BackfaceForceShadow; + #if defined(LIL_MULTI_INPUTS_SHADOW) + float _ShadowStrength; + float _ShadowNormalStrength; + float _ShadowBorder; + float _ShadowBlur; + float _Shadow2ndNormalStrength; + float _Shadow2ndBorder; + float _Shadow2ndBlur; + float _Shadow3rdNormalStrength; + float _Shadow3rdBorder; + float _Shadow3rdBlur; + float _ShadowStrengthMaskLOD; + float _ShadowBorderMaskLOD; + float _ShadowBlurMaskLOD; + float _ShadowMainStrength; + float _ShadowEnvStrength; + float _ShadowBorderRange; + float _ShadowReceive; + float _Shadow2ndReceive; + float _Shadow3rdReceive; + float _ShadowFlatBlur; + float _ShadowFlatBorder; + #endif + #if defined(LIL_MULTI_INPUTS_RIMSHADE) + float _RimShadeNormalStrength; + float _RimShadeBorder; + float _RimShadeBlur; + float _RimShadeFresnelPower; + #endif + #if defined(LIL_MULTI_INPUTS_BACKLIGHT) + float _BacklightNormalStrength; + float _BacklightBorder; + float _BacklightBlur; + float _BacklightDirectivity; + float _BacklightViewStrength; + float _BacklightBackfaceMask; + float _BacklightMainStrength; + #endif + #if defined(LIL_MULTI_INPUTS_NORMAL) + float _BumpScale; + #endif + #if defined(LIL_MULTI_INPUTS_NORMAL_2ND) + float _Bump2ndScale; + #endif + #if defined(LIL_MULTI_INPUTS_ANISOTROPY) + float _AnisotropyScale; + float _AnisotropyTangentWidth; + float _AnisotropyBitangentWidth; + float _AnisotropyShift; + float _AnisotropyShiftNoiseScale; + float _AnisotropySpecularStrength; + float _Anisotropy2ndTangentWidth; + float _Anisotropy2ndBitangentWidth; + float _Anisotropy2ndShift; + float _Anisotropy2ndShiftNoiseScale; + float _Anisotropy2ndSpecularStrength; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_GEM) + float _Reflectance; + float _SpecularNormalStrength; + float _SpecularBorder; + float _SpecularBlur; + float _ReflectionNormalStrength; + float _ReflectionCubeEnableLighting; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_GEM) || defined(LIL_REFRACTION_BLUR2) + float _Smoothness; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) + float _Metallic; + float _GSAAStrength; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP) + float _MatCapBlend; + float _MatCapEnableLighting; + float _MatCapShadowMask; + float _MatCapVRParallaxStrength; + float _MatCapBackfaceMask; + float _MatCapLod; + float _MatCapNormalStrength; + float _MatCapBumpScale; + float _MatCapMainStrength; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP_2ND) + float _MatCap2ndBlend; + float _MatCap2ndEnableLighting; + float _MatCap2ndShadowMask; + float _MatCap2ndVRParallaxStrength; + float _MatCap2ndBackfaceMask; + float _MatCap2ndLod; + float _MatCap2ndNormalStrength; + float _MatCap2ndBumpScale; + float _MatCap2ndMainStrength; + #endif + #if defined(LIL_MULTI_INPUTS_RIM) + float _RimNormalStrength; + float _RimBorder; + float _RimBlur; + float _RimFresnelPower; + float _RimEnableLighting; + float _RimShadowMask; + float _RimVRParallaxStrength; + float _RimDirStrength; + float _RimDirRange; + float _RimIndirRange; + float _RimIndirBorder; + float _RimIndirBlur; + float _RimBackfaceMask; + float _RimMainStrength; + #endif + #if defined(LIL_MULTI_INPUTS_GLITTER) + float _GlitterMainStrength; + float _GlitterPostContrast; + float _GlitterSensitivity; + float _GlitterNormalStrength; + float _GlitterEnableLighting; + float _GlitterShadowMask; + float _GlitterVRParallaxStrength; + float _GlitterBackfaceMask; + float _GlitterScaleRandomize; + #endif + #if defined(LIL_MULTI_INPUTS_DISTANCE_FADE) + float _DistanceFadeRimFresnelPower; + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION) + float _EmissionBlend; + float _EmissionParallaxDepth; + float _EmissionFluorescence; + float _EmissionGradSpeed; + float _EmissionMainStrength; + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION_2ND) + float _Emission2ndBlend; + float _Emission2ndParallaxDepth; + float _Emission2ndFluorescence; + float _Emission2ndGradSpeed; + float _Emission2ndMainStrength; + #endif + #if defined(LIL_MULTI_INPUTS_PARALLAX) + float _Parallax; + float _ParallaxOffset; + #endif + #if defined(LIL_MULTI_INPUTS_DITHER) + float _DitherMaxValue; + #endif + #if defined(LIL_MULTI_INPUTS_AUDIOLINK) + float _AudioLink2EmissionGrad; + float _AudioLink2Emission2ndGrad; + #endif + #if defined(LIL_MULTI_INPUTS_DISSOLVE) + float _DissolveNoiseStrength; + #endif + #if defined(LIL_MULTI_INPUTS_IDMASK) + float _IDMask1; + float _IDMask2; + float _IDMask3; + float _IDMask4; + float _IDMask5; + float _IDMask6; + float _IDMask7; + float _IDMask8; + float _IDMaskPrior1; + float _IDMaskPrior2; + float _IDMaskPrior3; + float _IDMaskPrior4; + float _IDMaskPrior5; + float _IDMaskPrior6; + float _IDMaskPrior7; + float _IDMaskPrior8; + #endif + #if defined(LIL_MULTI_INPUTS_UDIMDISCARD) + float _UDIMDiscardCompile; + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float _UDIMDiscardRow3_0; + float _UDIMDiscardRow3_1; + float _UDIMDiscardRow3_2; + float _UDIMDiscardRow3_3; + float _UDIMDiscardRow2_0; + float _UDIMDiscardRow2_1; + float _UDIMDiscardRow2_2; + float _UDIMDiscardRow2_3; + float _UDIMDiscardRow1_0; + float _UDIMDiscardRow1_1; + float _UDIMDiscardRow1_2; + float _UDIMDiscardRow1_3; + float _UDIMDiscardRow0_0; + float _UDIMDiscardRow0_1; + float _UDIMDiscardRow0_2; + float _UDIMDiscardRow0_3; + #endif + float _lilShadowCasterBias; + #if defined(LIL_MULTI_INPUTS_OUTLINE) + float _OutlineLitScale; + float _OutlineLitOffset; + float _OutlineWidth; + float _OutlineEnableLighting; + float _OutlineVectorScale; + float _OutlineFixWidth; + float _OutlineZBias; + #endif + #if defined(LIL_FUR) + float _FurVectorScale; + float _FurGravity; + float _FurAO; + float _FurRootOffset; + float _FurRandomize; + float _FurTouchStrength; + float _FurRimFresnelPower; + float _FurRimAntiLight; + #endif + #if defined(LIL_REFRACTION) || defined(LIL_GEM) + float _RefractionStrength; + float _RefractionFresnelPower; + #endif + #if defined(LIL_TESSELLATION) + float _TessEdge; + float _TessStrength; + float _TessShrink; + float _TessFactorMax; + #endif + #if defined(LIL_GEM) + float _GemChromaticAberration; + float _GemParticleLoop; + float _GemEnvContrast; + float _GemVRParallaxStrength; + #endif + #if defined(LIL_FEATURE_IDMASK) + int _IDMaskIndex1; + int _IDMaskIndex2; + int _IDMaskIndex3; + int _IDMaskIndex4; + int _IDMaskIndex5; + int _IDMaskIndex6; + int _IDMaskIndex7; + int _IDMaskIndex8; + uint _IDMaskFrom; + uint _IDMaskIsBitmap; + uint _IDMaskControlsDissolve; + #endif + uint _Cull; + #if defined(LIL_MULTI_INPUTS_OUTLINE) + uint _OutlineCull; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN2ND) + uint _Main2ndTexBlendMode; + uint _Main2ndTexAlphaMode; + uint _Main2ndTex_UVMode; + uint _Main2ndTex_Cull; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN3RD) + uint _Main3rdTexBlendMode; + uint _Main3rdTexAlphaMode; + uint _Main3rdTex_UVMode; + uint _Main3rdTex_Cull; + #endif + #if defined(LIL_MULTI_INPUTS_ALPHAMASK) + uint _AlphaMaskMode; + #endif + #if defined(LIL_MULTI_INPUTS_SHADOW) + uint _ShadowColorType; + uint _ShadowMaskType; + #endif + #if defined(LIL_MULTI_INPUTS_NORMAL_2ND) + uint _Bump2ndMap_UVMode; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) + uint _ReflectionBlendMode; + #endif + #if defined(LIL_MULTI_INPUTS_RIM) + uint _RimBlendMode; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP) + uint _MatCapBlendMode; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP_2ND) + uint _MatCap2ndBlendMode; + #endif + #if defined(LIL_MULTI_INPUTS_GLITTER) + uint _GlitterUVMode; + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION) + uint _EmissionMap_UVMode; + uint _EmissionBlendMode; + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION_2ND) + uint _Emission2ndMap_UVMode; + uint _Emission2ndBlendMode; + #endif + #if defined(LIL_MULTI_INPUTS_AUDIOLINK) + uint _AudioLinkUVMode; + uint _AudioLinkMask_UVMode; + uint _AudioLinkVertexUVMode; + #endif + #if defined(LIL_MULTI_INPUTS_DISTANCE_FADE) + uint _DistanceFadeMode; + #endif + #if defined(LIL_MULTI_INPUTS_DITHER) + uint _UseDither; + #endif + #if defined(LIL_MULTI_INPUTS_OUTLINE) + uint _OutlineVertexR2Width; + uint _OutlineVectorUVMode; + #endif + #if defined(LIL_FUR) + uint _FurLayerNum; + uint _FurMeshType; + #endif + lilBool _Invisible; + lilBool _UseClippingCanceller; + #if defined(LIL_MULTI_INPUTS_MAIN2ND) + lilBool _Main2ndTexIsMSDF; + lilBool _Main2ndTexIsDecal; + lilBool _Main2ndTexIsLeftOnly; + lilBool _Main2ndTexIsRightOnly; + lilBool _Main2ndTexShouldCopy; + lilBool _Main2ndTexShouldFlipMirror; + lilBool _Main2ndTexShouldFlipCopy; + #endif + #if defined(LIL_MULTI_INPUTS_MAIN3RD) + lilBool _Main3rdTexIsMSDF; + lilBool _Main3rdTexIsDecal; + lilBool _Main3rdTexIsLeftOnly; + lilBool _Main3rdTexIsRightOnly; + lilBool _Main3rdTexShouldCopy; + lilBool _Main3rdTexShouldFlipMirror; + lilBool _Main3rdTexShouldFlipCopy; + #endif + #if defined(LIL_MULTI_INPUTS_SHADOW) + lilBool _ShadowPostAO; + #endif + #if defined(LIL_MULTI_INPUTS_BACKLIGHT) + lilBool _BacklightReceiveShadow; + #endif + #if defined(LIL_MULTI_INPUTS_ANISOTROPY) + lilBool _Anisotropy2Reflection; + lilBool _Anisotropy2MatCap; + lilBool _Anisotropy2MatCap2nd; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) + lilBool _ApplySpecular; + lilBool _ApplySpecularFA; + lilBool _ApplyReflection; + lilBool _SpecularToon; + lilBool _ReflectionApplyTransparency; + #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_GEM) + lilBool _ReflectionCubeOverride; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP) + lilBool _MatCapApplyTransparency; + lilBool _MatCapPerspective; + lilBool _MatCapZRotCancel; + lilBool _MatCapCustomNormal; + #endif + #if defined(LIL_MULTI_INPUTS_MATCAP_2ND) + lilBool _MatCap2ndApplyTransparency; + lilBool _MatCap2ndPerspective; + lilBool _MatCap2ndZRotCancel; + lilBool _MatCap2ndCustomNormal; + #endif + #if defined(LIL_MULTI_INPUTS_RIM) + lilBool _RimApplyTransparency; + #endif + #if defined(LIL_MULTI_INPUTS_GLITTER) + lilBool _GlitterColorTex_UVMode; + lilBool _GlitterApplyTransparency; + #if defined(LIL_FEATURE_GlitterShapeTex) + lilBool _GlitterApplyShape; + lilBool _GlitterAngleRandomize; + #endif + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION) + lilBool _EmissionUseGrad; + #endif + #if defined(LIL_MULTI_INPUTS_EMISSION_2ND) + lilBool _Emission2ndUseGrad; + #endif + #if defined(LIL_MULTI_INPUTS_AUDIOLINK) + lilBool _AudioLink2Main2nd; + lilBool _AudioLink2Main3rd; + lilBool _AudioLink2Emission; + lilBool _AudioLink2Emission2nd; + lilBool _AudioLink2Vertex; + #endif + #if defined(LIL_FEATURE_ENCRYPTION) + lilBool _IgnoreEncryption; + #endif + #if defined(LIL_MULTI_INPUTS_OUTLINE) + lilBool _OutlineLitApplyTex; + lilBool _OutlineLitShadowReceive; + lilBool _OutlineDeleteMesh; + lilBool _OutlineDisableInVR; + #endif + #if defined(LIL_FUR) + lilBool _VertexColor2FurVector; + #endif + #if defined(LIL_REFRACTION) + lilBool _RefractionColorFromMain; + #endif +#else + #include "lil_common_input_base.hlsl" +#endif + +#if defined(LIL_CUSTOM_PROPERTIES) + LIL_CUSTOM_PROPERTIES +#endif +CBUFFER_END + +#endif // LIL_INPUT_BASE_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Texture +TEXTURE2D(_MainTex); +TEXTURE2D(_MainGradationTex); +TEXTURE2D(_MainColorAdjustMask); +TEXTURE2D(_Main2ndTex); +TEXTURE2D(_Main2ndBlendMask); +TEXTURE2D(_Main2ndDissolveMask); +TEXTURE2D(_Main2ndDissolveNoiseMask); +TEXTURE2D(_Main3rdTex); +TEXTURE2D(_Main3rdBlendMask); +TEXTURE2D(_Main3rdDissolveMask); +TEXTURE2D(_Main3rdDissolveNoiseMask); +TEXTURE2D(_AlphaMask); +TEXTURE2D(_BumpMap); +TEXTURE2D(_Bump2ndMap); +TEXTURE2D(_Bump2ndScaleMask); +TEXTURE2D(_AnisotropyTangentMap); +TEXTURE2D(_AnisotropyScaleMask); +TEXTURE2D(_AnisotropyShiftNoiseMask); +TEXTURE2D(_ShadowBorderMask); +TEXTURE2D(_ShadowBlurMask); +TEXTURE2D(_ShadowStrengthMask); +TEXTURE2D(_ShadowColorTex); +TEXTURE2D(_Shadow2ndColorTex); +TEXTURE2D(_Shadow3rdColorTex); +TEXTURE2D(_RimShadeMask); +TEXTURE2D(_BacklightColorTex); +TEXTURE2D(_SmoothnessTex); +TEXTURE2D(_MetallicGlossMap); +TEXTURE2D(_ReflectionColorTex); +TEXTURECUBE(_ReflectionCubeTex); +TEXTURE2D(_MatCapTex); +TEXTURE2D(_MatCapBlendMask); +TEXTURE2D(_MatCapBumpMap); +TEXTURE2D(_MatCap2ndTex); +TEXTURE2D(_MatCap2ndBlendMask); +TEXTURE2D(_MatCap2ndBumpMap); +TEXTURE2D(_RimColorTex); +TEXTURE2D(_GlitterColorTex); +TEXTURE2D(_GlitterShapeTex); +TEXTURE2D(_EmissionMap); +TEXTURE2D(_EmissionBlendMask); +TEXTURE2D(_EmissionGradTex); +TEXTURE2D(_Emission2ndMap); +TEXTURE2D(_Emission2ndBlendMask); +TEXTURE2D(_Emission2ndGradTex); +TEXTURE2D(_ParallaxMap); +TEXTURE2D(_DitherTex); +TEXTURE2D(_AudioLinkMask); +TEXTURE2D(_AudioLinkLocalMap); +TEXTURE2D(_DissolveMask); +TEXTURE2D(_DissolveNoiseMask); +TEXTURE2D(_OutlineTex); +TEXTURE2D(_OutlineWidthMask); +TEXTURE2D(_OutlineVectorTex); +TEXTURE2D(_FurNoiseMask); +TEXTURE2D(_FurMask); +TEXTURE2D(_FurLengthMask); +TEXTURE2D(_FurVectorTex); +TEXTURE2D(_TriMask); +SAMPLER(sampler_MainTex); +SAMPLER(sampler_Main2ndTex); +SAMPLER(sampler_Main3rdTex); +SAMPLER(sampler_EmissionMap); +SAMPLER(sampler_Emission2ndMap); +SAMPLER(sampler_AudioLinkMask); +SAMPLER(sampler_OutlineTex); + +// AudioLink +#if defined(LIL_FEATURE_AUDIOLINK) && !defined(AUDIOLINK_CGINC_INCLUDED) +TEXTURE2D_FLOAT(_AudioTexture); +float4 _AudioTexture_TexelSize; +#endif + +#if defined(LIL_OUTLINE) + #define sampler_MainTex sampler_OutlineTex +#endif +#if !defined(LIL_FEATURE_OutlineTex) + #define sampler_OutlineTex lil_sampler_linear_repeat +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Custom properties +#if defined(LIL_CUSTOM_TEXTURES) + LIL_CUSTOM_TEXTURES +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl.meta new file mode 100644 index 00000000..b5e95a14 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_input.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e03a05e7a51ae944280b84199c373536 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl new file mode 100644 index 00000000..70aa7776 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl @@ -0,0 +1,808 @@ +#ifndef LIL_INPUT_BASE_INCLUDED +#define LIL_INPUT_BASE_INCLUDED + +#if !defined(lilBool) + #define lilBool uint +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Vector +float4 _LightDirectionOverride; +float4 _BackfaceColor; +#if LIL_RENDER == 2 && !defined(LIL_FUR) && !defined(LIL_GEM) && !defined(LIL_REFRACTION) + float4 _PreColor; +#endif +// Main +float4 _Color; +float4 _MainTex_ST; +#if defined(LIL_FEATURE_ANIMATE_MAIN_UV) + float4 _MainTex_ScrollRotate; +#endif +#if defined(LIL_FEATURE_MAIN_TONE_CORRECTION) + float4 _MainTexHSVG; +#endif + +// Main2nd +#if defined(LIL_FEATURE_MAIN2ND) + float4 _Color2nd; + float4 _Main2ndTex_ST; + float4 _Main2ndTex_ScrollRotate; + float4 _Main2ndDistanceFade; + #if defined(LIL_FEATURE_DECAL) && defined(LIL_FEATURE_ANIMATE_DECAL) + float4 _Main2ndTexDecalAnimation; + float4 _Main2ndTexDecalSubParam; + #endif + #if defined(LIL_FEATURE_LAYER_DISSOLVE) + float4 _Main2ndDissolveMask_ST; + float4 _Main2ndDissolveColor; + float4 _Main2ndDissolveParams; + float4 _Main2ndDissolvePos; + #if defined(LIL_FEATURE_Main2ndDissolveNoiseMask) + float4 _Main2ndDissolveNoiseMask_ST; + float4 _Main2ndDissolveNoiseMask_ScrollRotate; + #endif + #endif +#endif + +// Main3rd +#if defined(LIL_FEATURE_MAIN3RD) + float4 _Color3rd; + float4 _Main3rdTex_ST; + float4 _Main3rdTex_ScrollRotate; + float4 _Main3rdDistanceFade; + #if defined(LIL_FEATURE_DECAL) && defined(LIL_FEATURE_ANIMATE_DECAL) + float4 _Main3rdTexDecalAnimation; + float4 _Main3rdTexDecalSubParam; + #endif + #if defined(LIL_FEATURE_LAYER_DISSOLVE) + float4 _Main3rdDissolveMask_ST; + float4 _Main3rdDissolveColor; + float4 _Main3rdDissolveParams; + float4 _Main3rdDissolvePos; + #if defined(LIL_FEATURE_Main3rdDissolveNoiseMask) + float4 _Main3rdDissolveNoiseMask_ST; + float4 _Main3rdDissolveNoiseMask_ScrollRotate; + #endif + #endif +#endif + +// Shadow +#if defined(LIL_FEATURE_SHADOW) + float4 _ShadowColor; + float4 _Shadow2ndColor; + #if defined(LIL_FEATURE_SHADOW_3RD) + float4 _Shadow3rdColor; + #endif + float4 _ShadowBorderColor; + float4 _ShadowAOShift; + #if defined(LIL_FEATURE_SHADOW_3RD) + float4 _ShadowAOShift2; + #endif +#endif + +// Rim Shade +#if defined(LIL_FEATURE_RIMSHADE) + float4 _RimShadeColor; +#endif + +// Backlight +#if defined(LIL_FEATURE_BACKLIGHT) + float4 _BacklightColor; + float4 _BacklightColorTex_ST; +#endif + +// Emission +#if defined(LIL_FEATURE_EMISSION_1ST) + float4 _EmissionColor; + float4 _EmissionBlink; + float4 _EmissionMap_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + float4 _EmissionMap_ScrollRotate; + #endif + float4 _EmissionBlendMask_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + float4 _EmissionBlendMask_ScrollRotate; + #endif +#endif + +// Emission 2nd +#if defined(LIL_FEATURE_EMISSION_2ND) + float4 _Emission2ndColor; + float4 _Emission2ndBlink; + float4 _Emission2ndMap_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + float4 _Emission2ndMap_ScrollRotate; + #endif + float4 _Emission2ndBlendMask_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + float4 _Emission2ndBlendMask_ScrollRotate; + #endif +#endif + +// Normal Map +#if defined(LIL_FEATURE_NORMAL_1ST) + float4 _BumpMap_ST; +#endif + +// Normal Map 2nd +#if defined(LIL_FEATURE_NORMAL_2ND) + float4 _Bump2ndMap_ST; + float4 _Bump2ndScaleMask_ST; +#endif + +// Anisotropy +#if defined(LIL_FEATURE_ANISOTROPY) + float4 _AnisotropyTangentMap_ST; + float4 _AnisotropyScaleMask_ST; + float4 _AnisotropyShiftNoiseMask_ST; +#endif + +// Reflection +#if defined(LIL_FEATURE_REFLECTION) + float4 _ReflectionColor; + float4 _MetallicGlossMap_ST; + float4 _ReflectionColorTex_ST; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_REFRACTION_BLUR2) + float4 _SmoothnessTex_ST; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + float4 _ReflectionCubeColor; + float4 _ReflectionCubeTex_HDR; +#endif + +// MatCap +#if defined(LIL_FEATURE_MATCAP) + float4 _MatCapColor; + float4 _MatCapTex_ST; + float4 _MatCapBlendMask_ST; + float4 _MatCapBlendUV1; + #if defined(LIL_FEATURE_MatCapBumpMap) + float4 _MatCapBumpMap_ST; + #endif +#endif + +// MatCap 2nd +#if defined(LIL_FEATURE_MATCAP_2ND) + float4 _MatCap2ndColor; + float4 _MatCap2ndTex_ST; + float4 _MatCap2ndBlendMask_ST; + float4 _MatCap2ndBlendUV1; + #if defined(LIL_FEATURE_MatCap2ndBumpMap) + float4 _MatCap2ndBumpMap_ST; + #endif +#endif + +// Rim Light +#if defined(LIL_FEATURE_RIMLIGHT) + float4 _RimColor; + float4 _RimColorTex_ST; + #if defined(LIL_FEATURE_RIMLIGHT_DIRECTION) + float4 _RimIndirColor; + #endif +#endif + +// Glitter +#if defined(LIL_FEATURE_GLITTER) + float4 _GlitterColor; + float4 _GlitterColorTex_ST; + float4 _GlitterParams1; + float4 _GlitterParams2; + #if defined(LIL_FEATURE_GlitterShapeTex) + float4 _GlitterShapeTex_ST; + float4 _GlitterAtras; + #endif +#endif + +// Distance Fade +#if defined(LIL_FEATURE_DISTANCE_FADE) + float4 _DistanceFade; + float4 _DistanceFadeColor; + float4 _DistanceFadeRimColor; +#endif + +// Dither +#if defined(LIL_FEATURE_DITHER) + float4 _DitherTex_TexelSize; +#endif + +// AudioLink +#if defined(LIL_FEATURE_AUDIOLINK) + float4 _AudioLinkMask_ST; + float4 _AudioLinkMask_ScrollRotate; + float4 _AudioLinkDefaultValue; + float4 _AudioLinkUVParams; + float4 _AudioLinkStart; + #if defined(LIL_FEATURE_AUDIOLINK_VERTEX) + float4 _AudioLinkVertexUVParams; + float4 _AudioLinkVertexStart; + float4 _AudioLinkVertexStrength; + #endif + #if defined(LIL_FEATURE_AUDIOLINK_LOCAL) + float4 _AudioLinkLocalMapParams; + #endif +#endif + +// Dissolve +#if defined(LIL_FEATURE_DISSOLVE) + float4 _DissolveMask_ST; + float4 _DissolveColor; + float4 _DissolveParams; + float4 _DissolvePos; + #if defined(LIL_FEATURE_DissolveNoiseMask) + float4 _DissolveNoiseMask_ST; + float4 _DissolveNoiseMask_ScrollRotate; + #endif +#endif + +// Encryption +#if defined(LIL_FEATURE_ENCRYPTION) + float4 _Keys; +#endif + +// Outline +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + float4 _OutlineColor; + float4 _OutlineLitColor; + float4 _OutlineTex_ST; + #if defined(LIL_FEATURE_ANIMATE_OUTLINE_UV) + float4 _OutlineTex_ScrollRotate; + #endif + #if defined(LIL_FEATURE_OutlineTex) + #if defined(LIL_FEATURE_OUTLINE_TONE_CORRECTION) + float4 _OutlineTexHSVG; + #endif + #endif +#endif + +// Fur +#if defined(LIL_FUR) + float4 _FurNoiseMask_ST; + float4 _FurVector; + float4 _FurRimColor; +#endif + +// Refraction +#if defined(LIL_REFRACTION) + float4 _RefractionColor; +#endif + +// Gem +#if defined(LIL_GEM) + float4 _GemParticleColor; + float4 _GemEnvColor; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Float +float _AsUnlit; +float _Cutoff; +#if LIL_RENDER == 2 && !defined(LIL_FUR) && !defined(LIL_GEM) && !defined(LIL_REFRACTION) + float _PreCutoff; +#endif +float _SubpassCutoff; +float _FlipNormal; +float _ShiftBackfaceUV; +float _VertexLightStrength; +float _LightMinLimit; +float _LightMaxLimit; +float _MonochromeLighting; +float _AAStrength; +#if defined(LIL_BRP) + float _AlphaBoostFA; +#endif +#if defined(LIL_HDRP) + float _BeforeExposureLimit; + float _lilDirectionalLightStrength; +#endif +#if defined(LIL_FEATURE_MAIN_GRADATION_MAP) + float _MainGradationStrength; +#endif +#if defined(LIL_FEATURE_MAIN2ND) + float _Main2ndTexAngle; + float _Main2ndEnableLighting; + #if defined(LIL_FEATURE_Main2ndDissolveNoiseMask) + float _Main2ndDissolveNoiseStrength; + #endif +#endif +#if defined(LIL_FEATURE_MAIN3RD) + float _Main3rdTexAngle; + float _Main3rdEnableLighting; + #if defined(LIL_FEATURE_Main3rdDissolveNoiseMask) + float _Main3rdDissolveNoiseStrength; + #endif +#endif +#if defined(LIL_FEATURE_ALPHAMASK) + float4 _AlphaMask_ST; + float _AlphaMaskScale; + float _AlphaMaskValue; +#endif +#if defined(LIL_FEATURE_SHADOW) + float _BackfaceForceShadow; + float _ShadowStrength; + float _ShadowNormalStrength; + float _ShadowBorder; + float _ShadowBlur; + float _ShadowStrengthMaskLOD; + float _ShadowBorderMaskLOD; + float _ShadowBlurMaskLOD; + float _Shadow2ndNormalStrength; + float _Shadow2ndBorder; + float _Shadow2ndBlur; + #if defined(LIL_FEATURE_SHADOW_3RD) + float _Shadow3rdNormalStrength; + float _Shadow3rdBorder; + float _Shadow3rdBlur; + #endif + float _ShadowMainStrength; + float _ShadowEnvStrength; + float _ShadowBorderRange; + #if defined(LIL_FEATURE_RECEIVE_SHADOW) + float _ShadowReceive; + float _Shadow2ndReceive; + float _Shadow3rdReceive; + #endif + float _ShadowFlatBlur; + float _ShadowFlatBorder; +#endif +#if defined(LIL_FEATURE_RIMSHADE) + float _RimShadeNormalStrength; + float _RimShadeBorder; + float _RimShadeBlur; + float _RimShadeFresnelPower; +#endif +#if defined(LIL_FEATURE_BACKLIGHT) + float _BacklightNormalStrength; + float _BacklightBorder; + float _BacklightBlur; + float _BacklightDirectivity; + float _BacklightViewStrength; + float _BacklightBackfaceMask; + float _BacklightMainStrength; +#endif +#if defined(LIL_FEATURE_NORMAL_1ST) + float _BumpScale; +#endif +#if defined(LIL_FEATURE_NORMAL_2ND) + float _Bump2ndScale; +#endif +#if defined(LIL_FEATURE_ANISOTROPY) + float _AnisotropyScale; + float _AnisotropyTangentWidth; + float _AnisotropyBitangentWidth; + float _AnisotropyShift; + float _AnisotropyShiftNoiseScale; + float _AnisotropySpecularStrength; + float _Anisotropy2ndTangentWidth; + float _Anisotropy2ndBitangentWidth; + float _Anisotropy2ndShift; + float _Anisotropy2ndShiftNoiseScale; + float _Anisotropy2ndSpecularStrength; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + float _Reflectance; + float _SpecularNormalStrength; + float _SpecularBorder; + float _SpecularBlur; + float _ReflectionNormalStrength; + float _ReflectionCubeEnableLighting; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) || defined(LIL_REFRACTION_BLUR2) + float _Smoothness; +#endif +#if defined(LIL_FEATURE_REFLECTION) + float _Metallic; + float _GSAAStrength; +#endif +#if defined(LIL_FEATURE_MATCAP) + float _MatCapBlend; + float _MatCapEnableLighting; + float _MatCapShadowMask; + float _MatCapVRParallaxStrength; + float _MatCapBackfaceMask; + float _MatCapLod; + float _MatCapNormalStrength; + float _MatCapMainStrength; + #if defined(LIL_FEATURE_MatCapBumpMap) + float _MatCapBumpScale; + #endif +#endif +#if defined(LIL_FEATURE_MATCAP_2ND) + float _MatCap2ndBlend; + float _MatCap2ndEnableLighting; + float _MatCap2ndShadowMask; + float _MatCap2ndVRParallaxStrength; + float _MatCap2ndBackfaceMask; + float _MatCap2ndLod; + float _MatCap2ndNormalStrength; + float _MatCap2ndMainStrength; + #if defined(LIL_FEATURE_MatCap2ndBumpMap) + float _MatCap2ndBumpScale; + #endif +#endif +#if defined(LIL_FEATURE_RIMLIGHT) + float _RimNormalStrength; + float _RimBorder; + float _RimBlur; + float _RimFresnelPower; + float _RimEnableLighting; + float _RimShadowMask; + float _RimVRParallaxStrength; + float _RimBackfaceMask; + float _RimMainStrength; + #if defined(LIL_FEATURE_RIMLIGHT_DIRECTION) + float _RimDirStrength; + float _RimDirRange; + float _RimIndirRange; + float _RimIndirBorder; + float _RimIndirBlur; + #endif +#endif +#if defined(LIL_FEATURE_GLITTER) + float _GlitterMainStrength; + float _GlitterPostContrast; + float _GlitterSensitivity; + float _GlitterNormalStrength; + float _GlitterEnableLighting; + float _GlitterShadowMask; + float _GlitterVRParallaxStrength; + float _GlitterBackfaceMask; + float _GlitterScaleRandomize; +#endif +#if defined(LIL_FEATURE_DISTANCE_FADE) + float _DistanceFadeRimFresnelPower; +#endif +#if defined(LIL_FEATURE_EMISSION_1ST) + float _EmissionBlend; + float _EmissionParallaxDepth; + float _EmissionFluorescence; + float _EmissionMainStrength; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + float _EmissionGradSpeed; + #endif +#endif +#if defined(LIL_FEATURE_EMISSION_2ND) + float _Emission2ndBlend; + float _Emission2ndParallaxDepth; + float _Emission2ndFluorescence; + float _Emission2ndMainStrength; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + float _Emission2ndGradSpeed; + #endif +#endif +#if defined(LIL_FEATURE_PARALLAX) + float _Parallax; + float _ParallaxOffset; +#endif +#if defined(LIL_FEATURE_DITHER) + float _DitherMaxValue; +#endif +#if defined(LIL_FEATURE_AUDIOLINK) + float _AudioLink2EmissionGrad; + float _AudioLink2Emission2ndGrad; +#endif +#if defined(LIL_FEATURE_DISSOLVE) && defined(LIL_FEATURE_DissolveNoiseMask) + float _DissolveNoiseStrength; +#endif +#if defined(LIL_FEATURE_IDMASK) + float _IDMask1; + float _IDMask2; + float _IDMask3; + float _IDMask4; + float _IDMask5; + float _IDMask6; + float _IDMask7; + float _IDMask8; + float _IDMaskPrior1; + float _IDMaskPrior2; + float _IDMaskPrior3; + float _IDMaskPrior4; + float _IDMaskPrior5; + float _IDMaskPrior6; + float _IDMaskPrior7; + float _IDMaskPrior8; +#endif +#if defined(LIL_FEATURE_UDIMDISCARD) + float _UDIMDiscardCompile; + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float _UDIMDiscardRow3_0; + float _UDIMDiscardRow3_1; + float _UDIMDiscardRow3_2; + float _UDIMDiscardRow3_3; + float _UDIMDiscardRow2_0; + float _UDIMDiscardRow2_1; + float _UDIMDiscardRow2_2; + float _UDIMDiscardRow2_3; + float _UDIMDiscardRow1_0; + float _UDIMDiscardRow1_1; + float _UDIMDiscardRow1_2; + float _UDIMDiscardRow1_3; + float _UDIMDiscardRow0_0; + float _UDIMDiscardRow0_1; + float _UDIMDiscardRow0_2; + float _UDIMDiscardRow0_3; +#endif +float _lilShadowCasterBias; + +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + float _OutlineLitScale; + float _OutlineLitOffset; + float _OutlineWidth; + float _OutlineEnableLighting; + float _OutlineVectorScale; + float _OutlineFixWidth; + float _OutlineZBias; +#endif + +#if defined(LIL_FUR) + float _FurVectorScale; + float _FurGravity; + float _FurAO; + float _FurRootOffset; + float _FurRandomize; + float _FurCutoutLength; + float _FurRimFresnelPower; + float _FurRimAntiLight; + #if defined(LIL_FEATURE_FUR_COLLISION) + float _FurTouchStrength; + #endif +#endif +#if defined(LIL_REFRACTION) + float _RefractionStrength; + float _RefractionFresnelPower; +#endif +#if defined(LIL_TESSELLATION) + float _TessEdge; + float _TessStrength; + float _TessShrink; + float _TessFactorMax; +#endif +#if defined(LIL_GEM) + float _GemChromaticAberration; + float _GemParticleLoop; + float _RefractionStrength; + float _RefractionFresnelPower; + float _GemEnvContrast; + float _GemVRParallaxStrength; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Int +#if defined(LIL_FEATURE_IDMASK) + int _IDMaskIndex1; + int _IDMaskIndex2; + int _IDMaskIndex3; + int _IDMaskIndex4; + int _IDMaskIndex5; + int _IDMaskIndex6; + int _IDMaskIndex7; + int _IDMaskIndex8; + uint _IDMaskFrom; + uint _IDMaskIsBitmap; + uint _IDMaskControlsDissolve; +#endif +uint _Cull; +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + uint _OutlineCull; +#endif +#if LIL_RENDER == 2 && !defined(LIL_FUR) && !defined(LIL_GEM) && !defined(LIL_REFRACTION) + uint _PreOutType; +#endif +#if defined(LIL_FEATURE_MAIN2ND) + uint _Main2ndTexBlendMode; + uint _Main2ndTexAlphaMode; + uint _Main2ndTex_UVMode; + uint _Main2ndTex_Cull; +#endif +#if defined(LIL_FEATURE_MAIN3RD) + uint _Main3rdTexBlendMode; + uint _Main3rdTexAlphaMode; + uint _Main3rdTex_UVMode; + uint _Main3rdTex_Cull; +#endif +#if defined(LIL_FEATURE_ALPHAMASK) + uint _AlphaMaskMode; +#endif +#if defined(LIL_FEATURE_SHADOW) + uint _ShadowColorType; + uint _ShadowMaskType; +#endif +#if defined(LIL_FEATURE_NORMAL_2ND) + uint _Bump2ndMap_UVMode; +#endif +#if defined(LIL_FEATURE_REFLECTION) + uint _ReflectionBlendMode; +#endif +#if defined(LIL_FEATURE_MATCAP) + uint _MatCapBlendMode; +#endif +#if defined(LIL_FEATURE_MATCAP_2ND) + uint _MatCap2ndBlendMode; +#endif +#if defined(LIL_FEATURE_RIMLIGHT) + uint _RimBlendMode; +#endif +#if defined(LIL_FEATURE_GLITTER) + uint _GlitterUVMode; +#endif +#if defined(LIL_FEATURE_EMISSION_1ST) + uint _EmissionMap_UVMode; + uint _EmissionBlendMode; +#endif +#if defined(LIL_FEATURE_EMISSION_2ND) + uint _Emission2ndMap_UVMode; + uint _Emission2ndBlendMode; +#endif +#if defined(LIL_FEATURE_AUDIOLINK) + uint _AudioLinkUVMode; + uint _AudioLinkMask_UVMode; + #if defined(LIL_FEATURE_AUDIOLINK_VERTEX) + uint _AudioLinkVertexUVMode; + #endif +#endif +#if defined(LIL_FEATURE_DISTANCE_FADE) + uint _DistanceFadeMode; +#endif +#if defined(LIL_FEATURE_DITHER) + uint _UseDither; +#endif +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + uint _OutlineVertexR2Width; + uint _OutlineVectorUVMode; +#endif +#if defined(LIL_FUR) + uint _FurLayerNum; + uint _FurMeshType; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Bool +lilBool _Invisible; +#if defined(LIL_FEATURE_MAIN2ND) + lilBool _UseMain2ndTex; + lilBool _Main2ndTexIsMSDF; + #if defined(LIL_FEATURE_DECAL) + lilBool _Main2ndTexIsDecal; + lilBool _Main2ndTexIsLeftOnly; + lilBool _Main2ndTexIsRightOnly; + lilBool _Main2ndTexShouldCopy; + lilBool _Main2ndTexShouldFlipMirror; + lilBool _Main2ndTexShouldFlipCopy; + #endif +#endif +#if defined(LIL_FEATURE_MAIN3RD) + lilBool _UseMain3rdTex; + lilBool _Main3rdTexIsMSDF; + #if defined(LIL_FEATURE_DECAL) + lilBool _Main3rdTexIsDecal; + lilBool _Main3rdTexIsLeftOnly; + lilBool _Main3rdTexIsRightOnly; + lilBool _Main3rdTexShouldCopy; + lilBool _Main3rdTexShouldFlipMirror; + lilBool _Main3rdTexShouldFlipCopy; + #endif +#endif +#if defined(LIL_FEATURE_SHADOW) + lilBool _UseShadow; + lilBool _ShadowPostAO; +#endif +#if defined(LIL_FEATURE_RIMSHADE) + lilBool _UseRimShade; +#endif +#if defined(LIL_FEATURE_BACKLIGHT) + lilBool _UseBacklight; + lilBool _BacklightReceiveShadow; +#endif +#if defined(LIL_FEATURE_NORMAL_1ST) + lilBool _UseBumpMap; +#endif +#if defined(LIL_FEATURE_NORMAL_2ND) + lilBool _UseBump2ndMap; +#endif +#if defined(LIL_FEATURE_ANISOTROPY) + lilBool _UseAnisotropy; + lilBool _Anisotropy2Reflection; + lilBool _Anisotropy2MatCap; + lilBool _Anisotropy2MatCap2nd; +#endif +#if defined(LIL_FEATURE_REFLECTION) + lilBool _UseReflection; + lilBool _ApplySpecular; + lilBool _ApplySpecularFA; + lilBool _ApplyReflection; + lilBool _SpecularToon; + lilBool _ReflectionApplyTransparency; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + lilBool _ReflectionCubeOverride; +#endif +#if defined(LIL_FEATURE_MATCAP) + lilBool _UseMatCap; + lilBool _MatCapApplyTransparency; + lilBool _MatCapPerspective; + lilBool _MatCapZRotCancel; + #if defined(LIL_FEATURE_MatCapBumpMap) + lilBool _MatCapCustomNormal; + #endif +#endif +#if defined(LIL_FEATURE_MATCAP_2ND) + lilBool _UseMatCap2nd; + lilBool _MatCap2ndApplyTransparency; + lilBool _MatCap2ndPerspective; + lilBool _MatCap2ndZRotCancel; + #if defined(LIL_FEATURE_MatCap2ndBumpMap) + lilBool _MatCap2ndCustomNormal; + #endif +#endif +#if defined(LIL_FEATURE_RIMLIGHT) + lilBool _UseRim; + lilBool _RimApplyTransparency; +#endif +#if defined(LIL_FEATURE_GLITTER) + lilBool _UseGlitter; + lilBool _GlitterColorTex_UVMode; + lilBool _GlitterApplyTransparency; + #if defined(LIL_FEATURE_GlitterShapeTex) + lilBool _GlitterApplyShape; + lilBool _GlitterAngleRandomize; + #endif +#endif +#if defined(LIL_FEATURE_EMISSION_1ST) + lilBool _UseEmission; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + lilBool _EmissionUseGrad; + #endif +#endif +#if defined(LIL_FEATURE_EMISSION_2ND) + lilBool _UseEmission2nd; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + lilBool _Emission2ndUseGrad; + #endif +#endif +#if defined(LIL_FEATURE_PARALLAX) + lilBool _UseParallax; + #if defined(LIL_FEATURE_POM) + lilBool _UsePOM; + #endif +#endif +#if defined(LIL_FEATURE_AUDIOLINK) + lilBool _UseAudioLink; + #if defined(LIL_FEATURE_MAIN2ND) + lilBool _AudioLink2Main2nd; + #endif + #if defined(LIL_FEATURE_MAIN3RD) + lilBool _AudioLink2Main3rd; + #endif + #if defined(LIL_FEATURE_EMISSION_1ST) + lilBool _AudioLink2Emission; + #endif + #if defined(LIL_FEATURE_EMISSION_2ND) + lilBool _AudioLink2Emission2nd; + #endif + #if defined(LIL_FEATURE_AUDIOLINK_VERTEX) + lilBool _AudioLink2Vertex; + #endif + #if defined(LIL_FEATURE_AUDIOLINK_LOCAL) + lilBool _AudioLinkAsLocal; + #endif +#endif +#if defined(LIL_FEATURE_ENCRYPTION) + lilBool _IgnoreEncryption; +#endif + +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + lilBool _OutlineLitApplyTex; + lilBool _OutlineLitShadowReceive; + lilBool _OutlineDeleteMesh; + lilBool _OutlineDisableInVR; +#endif + +#if defined(LIL_FUR) + lilBool _VertexColor2FurVector; +#endif +#if defined(LIL_REFRACTION) + lilBool _RefractionColorFromMain; +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl.meta new file mode 100644 index 00000000..88d0c5ce --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_input_base.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8ff7f7d9c86e1154fb3aac5a8a8681bb +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl new file mode 100644 index 00000000..70aa7776 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl @@ -0,0 +1,808 @@ +#ifndef LIL_INPUT_BASE_INCLUDED +#define LIL_INPUT_BASE_INCLUDED + +#if !defined(lilBool) + #define lilBool uint +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Vector +float4 _LightDirectionOverride; +float4 _BackfaceColor; +#if LIL_RENDER == 2 && !defined(LIL_FUR) && !defined(LIL_GEM) && !defined(LIL_REFRACTION) + float4 _PreColor; +#endif +// Main +float4 _Color; +float4 _MainTex_ST; +#if defined(LIL_FEATURE_ANIMATE_MAIN_UV) + float4 _MainTex_ScrollRotate; +#endif +#if defined(LIL_FEATURE_MAIN_TONE_CORRECTION) + float4 _MainTexHSVG; +#endif + +// Main2nd +#if defined(LIL_FEATURE_MAIN2ND) + float4 _Color2nd; + float4 _Main2ndTex_ST; + float4 _Main2ndTex_ScrollRotate; + float4 _Main2ndDistanceFade; + #if defined(LIL_FEATURE_DECAL) && defined(LIL_FEATURE_ANIMATE_DECAL) + float4 _Main2ndTexDecalAnimation; + float4 _Main2ndTexDecalSubParam; + #endif + #if defined(LIL_FEATURE_LAYER_DISSOLVE) + float4 _Main2ndDissolveMask_ST; + float4 _Main2ndDissolveColor; + float4 _Main2ndDissolveParams; + float4 _Main2ndDissolvePos; + #if defined(LIL_FEATURE_Main2ndDissolveNoiseMask) + float4 _Main2ndDissolveNoiseMask_ST; + float4 _Main2ndDissolveNoiseMask_ScrollRotate; + #endif + #endif +#endif + +// Main3rd +#if defined(LIL_FEATURE_MAIN3RD) + float4 _Color3rd; + float4 _Main3rdTex_ST; + float4 _Main3rdTex_ScrollRotate; + float4 _Main3rdDistanceFade; + #if defined(LIL_FEATURE_DECAL) && defined(LIL_FEATURE_ANIMATE_DECAL) + float4 _Main3rdTexDecalAnimation; + float4 _Main3rdTexDecalSubParam; + #endif + #if defined(LIL_FEATURE_LAYER_DISSOLVE) + float4 _Main3rdDissolveMask_ST; + float4 _Main3rdDissolveColor; + float4 _Main3rdDissolveParams; + float4 _Main3rdDissolvePos; + #if defined(LIL_FEATURE_Main3rdDissolveNoiseMask) + float4 _Main3rdDissolveNoiseMask_ST; + float4 _Main3rdDissolveNoiseMask_ScrollRotate; + #endif + #endif +#endif + +// Shadow +#if defined(LIL_FEATURE_SHADOW) + float4 _ShadowColor; + float4 _Shadow2ndColor; + #if defined(LIL_FEATURE_SHADOW_3RD) + float4 _Shadow3rdColor; + #endif + float4 _ShadowBorderColor; + float4 _ShadowAOShift; + #if defined(LIL_FEATURE_SHADOW_3RD) + float4 _ShadowAOShift2; + #endif +#endif + +// Rim Shade +#if defined(LIL_FEATURE_RIMSHADE) + float4 _RimShadeColor; +#endif + +// Backlight +#if defined(LIL_FEATURE_BACKLIGHT) + float4 _BacklightColor; + float4 _BacklightColorTex_ST; +#endif + +// Emission +#if defined(LIL_FEATURE_EMISSION_1ST) + float4 _EmissionColor; + float4 _EmissionBlink; + float4 _EmissionMap_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + float4 _EmissionMap_ScrollRotate; + #endif + float4 _EmissionBlendMask_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + float4 _EmissionBlendMask_ScrollRotate; + #endif +#endif + +// Emission 2nd +#if defined(LIL_FEATURE_EMISSION_2ND) + float4 _Emission2ndColor; + float4 _Emission2ndBlink; + float4 _Emission2ndMap_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + float4 _Emission2ndMap_ScrollRotate; + #endif + float4 _Emission2ndBlendMask_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + float4 _Emission2ndBlendMask_ScrollRotate; + #endif +#endif + +// Normal Map +#if defined(LIL_FEATURE_NORMAL_1ST) + float4 _BumpMap_ST; +#endif + +// Normal Map 2nd +#if defined(LIL_FEATURE_NORMAL_2ND) + float4 _Bump2ndMap_ST; + float4 _Bump2ndScaleMask_ST; +#endif + +// Anisotropy +#if defined(LIL_FEATURE_ANISOTROPY) + float4 _AnisotropyTangentMap_ST; + float4 _AnisotropyScaleMask_ST; + float4 _AnisotropyShiftNoiseMask_ST; +#endif + +// Reflection +#if defined(LIL_FEATURE_REFLECTION) + float4 _ReflectionColor; + float4 _MetallicGlossMap_ST; + float4 _ReflectionColorTex_ST; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_REFRACTION_BLUR2) + float4 _SmoothnessTex_ST; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + float4 _ReflectionCubeColor; + float4 _ReflectionCubeTex_HDR; +#endif + +// MatCap +#if defined(LIL_FEATURE_MATCAP) + float4 _MatCapColor; + float4 _MatCapTex_ST; + float4 _MatCapBlendMask_ST; + float4 _MatCapBlendUV1; + #if defined(LIL_FEATURE_MatCapBumpMap) + float4 _MatCapBumpMap_ST; + #endif +#endif + +// MatCap 2nd +#if defined(LIL_FEATURE_MATCAP_2ND) + float4 _MatCap2ndColor; + float4 _MatCap2ndTex_ST; + float4 _MatCap2ndBlendMask_ST; + float4 _MatCap2ndBlendUV1; + #if defined(LIL_FEATURE_MatCap2ndBumpMap) + float4 _MatCap2ndBumpMap_ST; + #endif +#endif + +// Rim Light +#if defined(LIL_FEATURE_RIMLIGHT) + float4 _RimColor; + float4 _RimColorTex_ST; + #if defined(LIL_FEATURE_RIMLIGHT_DIRECTION) + float4 _RimIndirColor; + #endif +#endif + +// Glitter +#if defined(LIL_FEATURE_GLITTER) + float4 _GlitterColor; + float4 _GlitterColorTex_ST; + float4 _GlitterParams1; + float4 _GlitterParams2; + #if defined(LIL_FEATURE_GlitterShapeTex) + float4 _GlitterShapeTex_ST; + float4 _GlitterAtras; + #endif +#endif + +// Distance Fade +#if defined(LIL_FEATURE_DISTANCE_FADE) + float4 _DistanceFade; + float4 _DistanceFadeColor; + float4 _DistanceFadeRimColor; +#endif + +// Dither +#if defined(LIL_FEATURE_DITHER) + float4 _DitherTex_TexelSize; +#endif + +// AudioLink +#if defined(LIL_FEATURE_AUDIOLINK) + float4 _AudioLinkMask_ST; + float4 _AudioLinkMask_ScrollRotate; + float4 _AudioLinkDefaultValue; + float4 _AudioLinkUVParams; + float4 _AudioLinkStart; + #if defined(LIL_FEATURE_AUDIOLINK_VERTEX) + float4 _AudioLinkVertexUVParams; + float4 _AudioLinkVertexStart; + float4 _AudioLinkVertexStrength; + #endif + #if defined(LIL_FEATURE_AUDIOLINK_LOCAL) + float4 _AudioLinkLocalMapParams; + #endif +#endif + +// Dissolve +#if defined(LIL_FEATURE_DISSOLVE) + float4 _DissolveMask_ST; + float4 _DissolveColor; + float4 _DissolveParams; + float4 _DissolvePos; + #if defined(LIL_FEATURE_DissolveNoiseMask) + float4 _DissolveNoiseMask_ST; + float4 _DissolveNoiseMask_ScrollRotate; + #endif +#endif + +// Encryption +#if defined(LIL_FEATURE_ENCRYPTION) + float4 _Keys; +#endif + +// Outline +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + float4 _OutlineColor; + float4 _OutlineLitColor; + float4 _OutlineTex_ST; + #if defined(LIL_FEATURE_ANIMATE_OUTLINE_UV) + float4 _OutlineTex_ScrollRotate; + #endif + #if defined(LIL_FEATURE_OutlineTex) + #if defined(LIL_FEATURE_OUTLINE_TONE_CORRECTION) + float4 _OutlineTexHSVG; + #endif + #endif +#endif + +// Fur +#if defined(LIL_FUR) + float4 _FurNoiseMask_ST; + float4 _FurVector; + float4 _FurRimColor; +#endif + +// Refraction +#if defined(LIL_REFRACTION) + float4 _RefractionColor; +#endif + +// Gem +#if defined(LIL_GEM) + float4 _GemParticleColor; + float4 _GemEnvColor; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Float +float _AsUnlit; +float _Cutoff; +#if LIL_RENDER == 2 && !defined(LIL_FUR) && !defined(LIL_GEM) && !defined(LIL_REFRACTION) + float _PreCutoff; +#endif +float _SubpassCutoff; +float _FlipNormal; +float _ShiftBackfaceUV; +float _VertexLightStrength; +float _LightMinLimit; +float _LightMaxLimit; +float _MonochromeLighting; +float _AAStrength; +#if defined(LIL_BRP) + float _AlphaBoostFA; +#endif +#if defined(LIL_HDRP) + float _BeforeExposureLimit; + float _lilDirectionalLightStrength; +#endif +#if defined(LIL_FEATURE_MAIN_GRADATION_MAP) + float _MainGradationStrength; +#endif +#if defined(LIL_FEATURE_MAIN2ND) + float _Main2ndTexAngle; + float _Main2ndEnableLighting; + #if defined(LIL_FEATURE_Main2ndDissolveNoiseMask) + float _Main2ndDissolveNoiseStrength; + #endif +#endif +#if defined(LIL_FEATURE_MAIN3RD) + float _Main3rdTexAngle; + float _Main3rdEnableLighting; + #if defined(LIL_FEATURE_Main3rdDissolveNoiseMask) + float _Main3rdDissolveNoiseStrength; + #endif +#endif +#if defined(LIL_FEATURE_ALPHAMASK) + float4 _AlphaMask_ST; + float _AlphaMaskScale; + float _AlphaMaskValue; +#endif +#if defined(LIL_FEATURE_SHADOW) + float _BackfaceForceShadow; + float _ShadowStrength; + float _ShadowNormalStrength; + float _ShadowBorder; + float _ShadowBlur; + float _ShadowStrengthMaskLOD; + float _ShadowBorderMaskLOD; + float _ShadowBlurMaskLOD; + float _Shadow2ndNormalStrength; + float _Shadow2ndBorder; + float _Shadow2ndBlur; + #if defined(LIL_FEATURE_SHADOW_3RD) + float _Shadow3rdNormalStrength; + float _Shadow3rdBorder; + float _Shadow3rdBlur; + #endif + float _ShadowMainStrength; + float _ShadowEnvStrength; + float _ShadowBorderRange; + #if defined(LIL_FEATURE_RECEIVE_SHADOW) + float _ShadowReceive; + float _Shadow2ndReceive; + float _Shadow3rdReceive; + #endif + float _ShadowFlatBlur; + float _ShadowFlatBorder; +#endif +#if defined(LIL_FEATURE_RIMSHADE) + float _RimShadeNormalStrength; + float _RimShadeBorder; + float _RimShadeBlur; + float _RimShadeFresnelPower; +#endif +#if defined(LIL_FEATURE_BACKLIGHT) + float _BacklightNormalStrength; + float _BacklightBorder; + float _BacklightBlur; + float _BacklightDirectivity; + float _BacklightViewStrength; + float _BacklightBackfaceMask; + float _BacklightMainStrength; +#endif +#if defined(LIL_FEATURE_NORMAL_1ST) + float _BumpScale; +#endif +#if defined(LIL_FEATURE_NORMAL_2ND) + float _Bump2ndScale; +#endif +#if defined(LIL_FEATURE_ANISOTROPY) + float _AnisotropyScale; + float _AnisotropyTangentWidth; + float _AnisotropyBitangentWidth; + float _AnisotropyShift; + float _AnisotropyShiftNoiseScale; + float _AnisotropySpecularStrength; + float _Anisotropy2ndTangentWidth; + float _Anisotropy2ndBitangentWidth; + float _Anisotropy2ndShift; + float _Anisotropy2ndShiftNoiseScale; + float _Anisotropy2ndSpecularStrength; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + float _Reflectance; + float _SpecularNormalStrength; + float _SpecularBorder; + float _SpecularBlur; + float _ReflectionNormalStrength; + float _ReflectionCubeEnableLighting; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) || defined(LIL_REFRACTION_BLUR2) + float _Smoothness; +#endif +#if defined(LIL_FEATURE_REFLECTION) + float _Metallic; + float _GSAAStrength; +#endif +#if defined(LIL_FEATURE_MATCAP) + float _MatCapBlend; + float _MatCapEnableLighting; + float _MatCapShadowMask; + float _MatCapVRParallaxStrength; + float _MatCapBackfaceMask; + float _MatCapLod; + float _MatCapNormalStrength; + float _MatCapMainStrength; + #if defined(LIL_FEATURE_MatCapBumpMap) + float _MatCapBumpScale; + #endif +#endif +#if defined(LIL_FEATURE_MATCAP_2ND) + float _MatCap2ndBlend; + float _MatCap2ndEnableLighting; + float _MatCap2ndShadowMask; + float _MatCap2ndVRParallaxStrength; + float _MatCap2ndBackfaceMask; + float _MatCap2ndLod; + float _MatCap2ndNormalStrength; + float _MatCap2ndMainStrength; + #if defined(LIL_FEATURE_MatCap2ndBumpMap) + float _MatCap2ndBumpScale; + #endif +#endif +#if defined(LIL_FEATURE_RIMLIGHT) + float _RimNormalStrength; + float _RimBorder; + float _RimBlur; + float _RimFresnelPower; + float _RimEnableLighting; + float _RimShadowMask; + float _RimVRParallaxStrength; + float _RimBackfaceMask; + float _RimMainStrength; + #if defined(LIL_FEATURE_RIMLIGHT_DIRECTION) + float _RimDirStrength; + float _RimDirRange; + float _RimIndirRange; + float _RimIndirBorder; + float _RimIndirBlur; + #endif +#endif +#if defined(LIL_FEATURE_GLITTER) + float _GlitterMainStrength; + float _GlitterPostContrast; + float _GlitterSensitivity; + float _GlitterNormalStrength; + float _GlitterEnableLighting; + float _GlitterShadowMask; + float _GlitterVRParallaxStrength; + float _GlitterBackfaceMask; + float _GlitterScaleRandomize; +#endif +#if defined(LIL_FEATURE_DISTANCE_FADE) + float _DistanceFadeRimFresnelPower; +#endif +#if defined(LIL_FEATURE_EMISSION_1ST) + float _EmissionBlend; + float _EmissionParallaxDepth; + float _EmissionFluorescence; + float _EmissionMainStrength; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + float _EmissionGradSpeed; + #endif +#endif +#if defined(LIL_FEATURE_EMISSION_2ND) + float _Emission2ndBlend; + float _Emission2ndParallaxDepth; + float _Emission2ndFluorescence; + float _Emission2ndMainStrength; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + float _Emission2ndGradSpeed; + #endif +#endif +#if defined(LIL_FEATURE_PARALLAX) + float _Parallax; + float _ParallaxOffset; +#endif +#if defined(LIL_FEATURE_DITHER) + float _DitherMaxValue; +#endif +#if defined(LIL_FEATURE_AUDIOLINK) + float _AudioLink2EmissionGrad; + float _AudioLink2Emission2ndGrad; +#endif +#if defined(LIL_FEATURE_DISSOLVE) && defined(LIL_FEATURE_DissolveNoiseMask) + float _DissolveNoiseStrength; +#endif +#if defined(LIL_FEATURE_IDMASK) + float _IDMask1; + float _IDMask2; + float _IDMask3; + float _IDMask4; + float _IDMask5; + float _IDMask6; + float _IDMask7; + float _IDMask8; + float _IDMaskPrior1; + float _IDMaskPrior2; + float _IDMaskPrior3; + float _IDMaskPrior4; + float _IDMaskPrior5; + float _IDMaskPrior6; + float _IDMaskPrior7; + float _IDMaskPrior8; +#endif +#if defined(LIL_FEATURE_UDIMDISCARD) + float _UDIMDiscardCompile; + float _UDIMDiscardMode; + float _UDIMDiscardUV; + float _UDIMDiscardRow3_0; + float _UDIMDiscardRow3_1; + float _UDIMDiscardRow3_2; + float _UDIMDiscardRow3_3; + float _UDIMDiscardRow2_0; + float _UDIMDiscardRow2_1; + float _UDIMDiscardRow2_2; + float _UDIMDiscardRow2_3; + float _UDIMDiscardRow1_0; + float _UDIMDiscardRow1_1; + float _UDIMDiscardRow1_2; + float _UDIMDiscardRow1_3; + float _UDIMDiscardRow0_0; + float _UDIMDiscardRow0_1; + float _UDIMDiscardRow0_2; + float _UDIMDiscardRow0_3; +#endif +float _lilShadowCasterBias; + +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + float _OutlineLitScale; + float _OutlineLitOffset; + float _OutlineWidth; + float _OutlineEnableLighting; + float _OutlineVectorScale; + float _OutlineFixWidth; + float _OutlineZBias; +#endif + +#if defined(LIL_FUR) + float _FurVectorScale; + float _FurGravity; + float _FurAO; + float _FurRootOffset; + float _FurRandomize; + float _FurCutoutLength; + float _FurRimFresnelPower; + float _FurRimAntiLight; + #if defined(LIL_FEATURE_FUR_COLLISION) + float _FurTouchStrength; + #endif +#endif +#if defined(LIL_REFRACTION) + float _RefractionStrength; + float _RefractionFresnelPower; +#endif +#if defined(LIL_TESSELLATION) + float _TessEdge; + float _TessStrength; + float _TessShrink; + float _TessFactorMax; +#endif +#if defined(LIL_GEM) + float _GemChromaticAberration; + float _GemParticleLoop; + float _RefractionStrength; + float _RefractionFresnelPower; + float _GemEnvContrast; + float _GemVRParallaxStrength; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Int +#if defined(LIL_FEATURE_IDMASK) + int _IDMaskIndex1; + int _IDMaskIndex2; + int _IDMaskIndex3; + int _IDMaskIndex4; + int _IDMaskIndex5; + int _IDMaskIndex6; + int _IDMaskIndex7; + int _IDMaskIndex8; + uint _IDMaskFrom; + uint _IDMaskIsBitmap; + uint _IDMaskControlsDissolve; +#endif +uint _Cull; +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + uint _OutlineCull; +#endif +#if LIL_RENDER == 2 && !defined(LIL_FUR) && !defined(LIL_GEM) && !defined(LIL_REFRACTION) + uint _PreOutType; +#endif +#if defined(LIL_FEATURE_MAIN2ND) + uint _Main2ndTexBlendMode; + uint _Main2ndTexAlphaMode; + uint _Main2ndTex_UVMode; + uint _Main2ndTex_Cull; +#endif +#if defined(LIL_FEATURE_MAIN3RD) + uint _Main3rdTexBlendMode; + uint _Main3rdTexAlphaMode; + uint _Main3rdTex_UVMode; + uint _Main3rdTex_Cull; +#endif +#if defined(LIL_FEATURE_ALPHAMASK) + uint _AlphaMaskMode; +#endif +#if defined(LIL_FEATURE_SHADOW) + uint _ShadowColorType; + uint _ShadowMaskType; +#endif +#if defined(LIL_FEATURE_NORMAL_2ND) + uint _Bump2ndMap_UVMode; +#endif +#if defined(LIL_FEATURE_REFLECTION) + uint _ReflectionBlendMode; +#endif +#if defined(LIL_FEATURE_MATCAP) + uint _MatCapBlendMode; +#endif +#if defined(LIL_FEATURE_MATCAP_2ND) + uint _MatCap2ndBlendMode; +#endif +#if defined(LIL_FEATURE_RIMLIGHT) + uint _RimBlendMode; +#endif +#if defined(LIL_FEATURE_GLITTER) + uint _GlitterUVMode; +#endif +#if defined(LIL_FEATURE_EMISSION_1ST) + uint _EmissionMap_UVMode; + uint _EmissionBlendMode; +#endif +#if defined(LIL_FEATURE_EMISSION_2ND) + uint _Emission2ndMap_UVMode; + uint _Emission2ndBlendMode; +#endif +#if defined(LIL_FEATURE_AUDIOLINK) + uint _AudioLinkUVMode; + uint _AudioLinkMask_UVMode; + #if defined(LIL_FEATURE_AUDIOLINK_VERTEX) + uint _AudioLinkVertexUVMode; + #endif +#endif +#if defined(LIL_FEATURE_DISTANCE_FADE) + uint _DistanceFadeMode; +#endif +#if defined(LIL_FEATURE_DITHER) + uint _UseDither; +#endif +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + uint _OutlineVertexR2Width; + uint _OutlineVectorUVMode; +#endif +#if defined(LIL_FUR) + uint _FurLayerNum; + uint _FurMeshType; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Bool +lilBool _Invisible; +#if defined(LIL_FEATURE_MAIN2ND) + lilBool _UseMain2ndTex; + lilBool _Main2ndTexIsMSDF; + #if defined(LIL_FEATURE_DECAL) + lilBool _Main2ndTexIsDecal; + lilBool _Main2ndTexIsLeftOnly; + lilBool _Main2ndTexIsRightOnly; + lilBool _Main2ndTexShouldCopy; + lilBool _Main2ndTexShouldFlipMirror; + lilBool _Main2ndTexShouldFlipCopy; + #endif +#endif +#if defined(LIL_FEATURE_MAIN3RD) + lilBool _UseMain3rdTex; + lilBool _Main3rdTexIsMSDF; + #if defined(LIL_FEATURE_DECAL) + lilBool _Main3rdTexIsDecal; + lilBool _Main3rdTexIsLeftOnly; + lilBool _Main3rdTexIsRightOnly; + lilBool _Main3rdTexShouldCopy; + lilBool _Main3rdTexShouldFlipMirror; + lilBool _Main3rdTexShouldFlipCopy; + #endif +#endif +#if defined(LIL_FEATURE_SHADOW) + lilBool _UseShadow; + lilBool _ShadowPostAO; +#endif +#if defined(LIL_FEATURE_RIMSHADE) + lilBool _UseRimShade; +#endif +#if defined(LIL_FEATURE_BACKLIGHT) + lilBool _UseBacklight; + lilBool _BacklightReceiveShadow; +#endif +#if defined(LIL_FEATURE_NORMAL_1ST) + lilBool _UseBumpMap; +#endif +#if defined(LIL_FEATURE_NORMAL_2ND) + lilBool _UseBump2ndMap; +#endif +#if defined(LIL_FEATURE_ANISOTROPY) + lilBool _UseAnisotropy; + lilBool _Anisotropy2Reflection; + lilBool _Anisotropy2MatCap; + lilBool _Anisotropy2MatCap2nd; +#endif +#if defined(LIL_FEATURE_REFLECTION) + lilBool _UseReflection; + lilBool _ApplySpecular; + lilBool _ApplySpecularFA; + lilBool _ApplyReflection; + lilBool _SpecularToon; + lilBool _ReflectionApplyTransparency; +#endif +#if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + lilBool _ReflectionCubeOverride; +#endif +#if defined(LIL_FEATURE_MATCAP) + lilBool _UseMatCap; + lilBool _MatCapApplyTransparency; + lilBool _MatCapPerspective; + lilBool _MatCapZRotCancel; + #if defined(LIL_FEATURE_MatCapBumpMap) + lilBool _MatCapCustomNormal; + #endif +#endif +#if defined(LIL_FEATURE_MATCAP_2ND) + lilBool _UseMatCap2nd; + lilBool _MatCap2ndApplyTransparency; + lilBool _MatCap2ndPerspective; + lilBool _MatCap2ndZRotCancel; + #if defined(LIL_FEATURE_MatCap2ndBumpMap) + lilBool _MatCap2ndCustomNormal; + #endif +#endif +#if defined(LIL_FEATURE_RIMLIGHT) + lilBool _UseRim; + lilBool _RimApplyTransparency; +#endif +#if defined(LIL_FEATURE_GLITTER) + lilBool _UseGlitter; + lilBool _GlitterColorTex_UVMode; + lilBool _GlitterApplyTransparency; + #if defined(LIL_FEATURE_GlitterShapeTex) + lilBool _GlitterApplyShape; + lilBool _GlitterAngleRandomize; + #endif +#endif +#if defined(LIL_FEATURE_EMISSION_1ST) + lilBool _UseEmission; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + lilBool _EmissionUseGrad; + #endif +#endif +#if defined(LIL_FEATURE_EMISSION_2ND) + lilBool _UseEmission2nd; + #if defined(LIL_FEATURE_EMISSION_GRADATION) + lilBool _Emission2ndUseGrad; + #endif +#endif +#if defined(LIL_FEATURE_PARALLAX) + lilBool _UseParallax; + #if defined(LIL_FEATURE_POM) + lilBool _UsePOM; + #endif +#endif +#if defined(LIL_FEATURE_AUDIOLINK) + lilBool _UseAudioLink; + #if defined(LIL_FEATURE_MAIN2ND) + lilBool _AudioLink2Main2nd; + #endif + #if defined(LIL_FEATURE_MAIN3RD) + lilBool _AudioLink2Main3rd; + #endif + #if defined(LIL_FEATURE_EMISSION_1ST) + lilBool _AudioLink2Emission; + #endif + #if defined(LIL_FEATURE_EMISSION_2ND) + lilBool _AudioLink2Emission2nd; + #endif + #if defined(LIL_FEATURE_AUDIOLINK_VERTEX) + lilBool _AudioLink2Vertex; + #endif + #if defined(LIL_FEATURE_AUDIOLINK_LOCAL) + lilBool _AudioLinkAsLocal; + #endif +#endif +#if defined(LIL_FEATURE_ENCRYPTION) + lilBool _IgnoreEncryption; +#endif + +#if !defined(LIL_FUR) && !defined(LIL_REFRACTION) && !defined(LIL_GEM) + lilBool _OutlineLitApplyTex; + lilBool _OutlineLitShadowReceive; + lilBool _OutlineDeleteMesh; + lilBool _OutlineDisableInVR; +#endif + +#if defined(LIL_FUR) + lilBool _VertexColor2FurVector; +#endif +#if defined(LIL_REFRACTION) + lilBool _RefractionColorFromMain; +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl.meta new file mode 100644 index 00000000..98ce025b --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_input_opt.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 571051a232e4af44a98389bda858df27 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl new file mode 100644 index 00000000..58ebba77 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl @@ -0,0 +1,2338 @@ +#ifndef LIL_MACRO_INCLUDED +#define LIL_MACRO_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Setting + +// The version of SRP is automatically determined, but an error may occur in a specific version. +// In that case, define the version. +// Example: HDRP 4.8.0 +// #define LIL_SRP_VERSION_MAJOR 4 +// #define LIL_SRP_VERSION_MINOR 8 + +// Transparent mode on subpass (Default : 0) +// 0 : Cutout +// 1 : Dither +#define LIL_SUBPASS_TRANSPARENT_MODE 0 + +// Refraction blur +#define LIL_REFRACTION_SAMPNUM 8 +#define LIL_REFRACTION_GAUSDIST(i) exp(-(float)i*(float)i/(LIL_REFRACTION_SAMPNUM*LIL_REFRACTION_SAMPNUM/2.0)) + +// Antialias mode (Default : 1) +// 0 : Off +// 1 : On +#define LIL_ANTIALIAS_MODE 1 + +// Light Probe Proxy Volumes (Default : 0) +#define LIL_LPPV_MODE 0 +// 0 : Off +// 1 : On + +// Additional Lights Mode (Default : 3 or 4) +// 0 : Off +// 1 : In Vertex Shader +// 2 : In Fragment Shader +// 3 : Add to main light +// 4 : Add to main light with direction +// 5 : Add to main light with direction in Fragment Shader +#if defined(LIL_BRP) + #define LIL_ADDITIONAL_LIGHT_MODE 3 + #define LIL_ADDITIONAL_LIGHT_STRENGTH _VertexLightStrength +#elif defined(LIL_HDRP) + #define LIL_ADDITIONAL_LIGHT_MODE 5 + #define LIL_ADDITIONAL_LIGHT_STRENGTH 1 +#elif defined(USE_CLUSTERED_LIGHTING) && USE_CLUSTERED_LIGHTING || defined(USE_FORWARD_PLUS) && USE_FORWARD_PLUS + #define LIL_ADDITIONAL_LIGHT_MODE 5 + #define LIL_ADDITIONAL_LIGHT_STRENGTH 1 +#else + #define LIL_ADDITIONAL_LIGHT_MODE 4 + #define LIL_ADDITIONAL_LIGHT_STRENGTH 1 +#endif + +// Near clip threshold for clipping canceller (Default : 0.1) +#define LIL_NEARCLIP_THRESHOLD 0.1 + +//------------------------------------------------------------------------------------------------------------------------------ +// Version +#if !defined(LIL_SRP_VERSION_MAJOR) + #if UNITY_VERSION < 201810 + #define LIL_SRP_VERSION_MAJOR 0 + #elif UNITY_VERSION < 201820 + #define LIL_SRP_VERSION_MAJOR 1 + #elif UNITY_VERSION < 201830 + #define LIL_SRP_VERSION_MAJOR 2 + #elif UNITY_VERSION < 201840 + #define LIL_SRP_VERSION_MAJOR 3 + #elif UNITY_VERSION < 201910 + #define LIL_SRP_VERSION_MAJOR 4 + #elif UNITY_VERSION < 201920 + #define LIL_SRP_VERSION_MAJOR 5 + #elif UNITY_VERSION < 201930 + #define LIL_SRP_VERSION_MAJOR 6 + #elif UNITY_VERSION < 201940 + #define LIL_SRP_VERSION_MAJOR 7 + #elif UNITY_VERSION < 202010 + #define LIL_SRP_VERSION_MAJOR 8 + #elif UNITY_VERSION < 202020 + #define LIL_SRP_VERSION_MAJOR 9 + #elif UNITY_VERSION < 202030 + #define LIL_SRP_VERSION_MAJOR 10 + #elif UNITY_VERSION < 202110 + #define LIL_SRP_VERSION_MAJOR 11 + #elif UNITY_VERSION < 202120 + #define LIL_SRP_VERSION_MAJOR 12 + #elif UNITY_VERSION < 202210 + #define LIL_SRP_VERSION_MAJOR 13 + #else + #define LIL_SRP_VERSION_MAJOR 14 + #endif +#endif +#if !defined(LIL_SRP_VERSION_MINOR) + #define LIL_SRP_VERSION_MINOR 99 +#endif +#if !defined(LIL_SRP_VERSION_GREATER_EQUAL) + #define LIL_SRP_VERSION_GREATER_EQUAL(major, minor) ((LIL_SRP_VERSION_MAJOR > major) || ((LIL_SRP_VERSION_MAJOR == major) && (LIL_SRP_VERSION_MINOR >= minor))) + #define LIL_SRP_VERSION_LOWER(major, minor) ((LIL_SRP_VERSION_MAJOR < major) || ((LIL_SRP_VERSION_MAJOR == major) && (LIL_SRP_VERSION_MINOR < minor))) + #define LIL_SRP_VERSION_EQUAL(major, minor) ((LIL_SRP_VERSION_MAJOR == major) && (LIL_SRP_VERSION_MINOR == minor)) +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Replace Macro +#define LIL_BRANCH +#define LIL_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID +#define LIL_VERTEX_OUTPUT_STEREO UNITY_VERTEX_OUTPUT_STEREO +#define LIL_SETUP_INSTANCE_ID(i) UNITY_SETUP_INSTANCE_ID(i) +#define LIL_TRANSFER_INSTANCE_ID(i,o) UNITY_TRANSFER_INSTANCE_ID(i,o) +#define LIL_INITIALIZE_VERTEX_OUTPUT_STEREO(o) UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o) +#define LIL_TRANSFER_VERTEX_OUTPUT_STEREO(i,o) UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i,o) +#define LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i) UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i) + +// Gamma +#if defined(UNITY_COLORSPACE_GAMMA) + #define LIL_COLORSPACE_GAMMA + float lilLuminance(float3 rgb) { return dot(rgb, float3(0.22, 0.707, 0.071)); } +#else + float lilLuminance(float3 rgb) { return dot(rgb, float3(0.0396819152, 0.458021790, 0.00609653955)); } +#endif + +// Initialize struct +#if defined(UNITY_INITIALIZE_OUTPUT) + #define LIL_INITIALIZE_STRUCT(type,name) UNITY_INITIALIZE_OUTPUT(type,name) +#else + #define LIL_INITIALIZE_STRUCT(type,name) name = (type)0 +#endif + +// Additional Light +#if (!defined(LIL_PASS_FORWARDADD) && defined(UNITY_SHOULD_SAMPLE_SH)) || defined(_ADDITIONAL_LIGHTS) || defined(_ADDITIONAL_LIGHTS_VERTEX) || defined(LIL_HDRP) + #define LIL_USE_ADDITIONALLIGHT + #if LIL_ADDITIONAL_LIGHT_MODE == 1 + #define LIL_USE_ADDITIONALLIGHT_VS + #elif LIL_ADDITIONAL_LIGHT_MODE == 2 + #define LIL_USE_ADDITIONALLIGHT_PS + #elif LIL_ADDITIONAL_LIGHT_MODE == 3 + #define LIL_USE_ADDITIONALLIGHT_MAIN + #elif LIL_ADDITIONAL_LIGHT_MODE == 4 + #define LIL_USE_ADDITIONALLIGHT_MAINDIR + #elif LIL_ADDITIONAL_LIGHT_MODE == 5 + #define LIL_USE_ADDITIONALLIGHT_MAINDIR_PS + #endif +#endif + +// Lightmap +#if defined(LIGHTMAP_ON) + #define LIL_USE_LIGHTMAP +#endif +#if defined(DYNAMICLIGHTMAP_ON) && !(defined(LIL_URP) && LIL_SRP_VERSION_LOWER(12, 0)) + #define LIL_USE_DYNAMICLIGHTMAP +#endif +#if defined(DIRLIGHTMAP_COMBINED) + #define LIL_USE_DIRLIGHTMAP +#endif +#if defined(SHADOWS_SHADOWMASK) + #define LIL_LIGHTMODE_SHADOWMASK +#endif +#if defined(LIGHTMAP_SHADOW_MIXING) + #define LIL_LIGHTMODE_SUBTRACTIVE +#endif + +// DOTS instancing +#if defined(UNITY_DOTS_INSTANCING_ENABLED) + #define LIL_USE_DOTS_INSTANCING +#endif + +// Conbine +#if defined(SHADOWS_SCREEN) || defined(_MAIN_LIGHT_SHADOWS) || defined(_MAIN_LIGHT_SHADOWS_CASCADE) || defined(_MAIN_LIGHT_SHADOWS_SCREEN) || defined(SHADOW_LOW) || defined(SHADOW_MEDIUM) || defined(SHADOW_HIGH) + #define LIL_USE_SHADOW +#endif +#if defined(LIL_USE_LIGHTMAP) || defined(LIL_USE_DYNAMICLIGHTMAP) || defined(LIL_USE_DIRLIGHTMAP) || defined(LIL_LIGHTMODE_SHADOWMASK) + #define LIL_USE_LIGHTMAP_UV +#endif + +// Directional Lightmap +#undef LIL_USE_DIRLIGHTMAP + +// Light Probe Proxy Volumes +#if (LIL_LPPV_MODE != 0) && UNITY_LIGHT_PROBE_PROXY_VOLUME + #define LIL_USE_LPPV +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Optimization Macro + +// tangentWS / bitangentWS / normalWS +#if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) || defined(LIL_FEATURE_ANISOTROPY) || defined(LIL_FEATURE_MatCapBumpMap) || defined(LIL_FEATURE_MatCap2ndBumpMap) || defined(LIL_FEATURE_EMISSION_1ST) || defined(LIL_FEATURE_EMISSION_2ND) || defined(LIL_FEATURE_PARALLAX) + #define LIL_SHOULD_TBN +#endif + +// tangentOS (vertex input) +#if defined(LIL_SHOULD_TBN) || (defined(LIL_FEATURE_MAIN2ND) || defined(LIL_FEATURE_MAIN3RD)) && defined(LIL_FEATURE_DECAL) + #define LIL_SHOULD_TANGENT +#endif + +// normalOS (vertex input) +#if defined(LIL_SHOULD_TANGENT) || defined(LIL_FEATURE_SHADOW) || defined(LIL_FEATURE_RIMSHADE) || defined(LIL_FEATURE_REFLECTION) || defined(LIL_FEATURE_MATCAP) || defined(LIL_FEATURE_MATCAP_2ND) || defined(LIL_FEATURE_RIMLIGHT) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_BACKLIGHT) || defined(LIL_FEATURE_DISTANCE_FADE) || defined(LIL_FEATURE_AUDIOLINK) || defined(LIL_FEATURE_LTCGI) || defined(LIL_REFRACTION) || (defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SUBTRACTIVE)) || defined(LIL_HDRP) + #define LIL_SHOULD_NORMAL +#endif + +// positionOS +#if (defined(LIL_FEATURE_MAIN2ND) || defined(LIL_FEATURE_MAIN3RD)) && defined(LIL_FEATURE_LAYER_DISSOLVE) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_DISSOLVE) || defined(LIL_FEATURE_AUDIOLINK) + #define LIL_SHOULD_POSITION_OS +#endif + +// positionWS +#if defined(SHADOWS_SCREEN) || defined(LIL_PASS_FORWARDADD) || defined(LIL_FEATURE_MAIN2ND) || defined(LIL_FEATURE_MAIN3RD) || defined(LIL_FEATURE_ANISOTROPY) || defined(LIL_FEATURE_RECEIVE_SHADOW) || defined(LIL_FEATURE_RIMSHADE) || defined(LIL_FEATURE_REFLECTION) || defined(LIL_FEATURE_MATCAP) || defined(LIL_FEATURE_MATCAP_2ND) || defined(LIL_FEATURE_RIMLIGHT) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_BACKLIGHT) || defined(LIL_FEATURE_EMISSION_1ST) || defined(LIL_FEATURE_EMISSION_2ND) || defined(LIL_FEATURE_PARALLAX) || defined(LIL_FEATURE_DISTANCE_FADE) || defined(LIL_FEATURE_LTCGI) || defined(LIL_REFRACTION) || !defined(LIL_BRP) || defined(LIL_USE_LPPV) + #define LIL_SHOULD_POSITION_WS +#endif + +// uv1 +#if defined(LIL_FEATURE_MATCAP) || defined(LIL_FEATURE_MATCAP_2ND) || defined(LIL_FEATURE_GLITTER) + #define LIL_SHOULD_UV1 +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Screen params +#if defined(LIL_URP) + #define LIL_SCREENPARAMS _ScaledScreenParams +#else + #define LIL_SCREENPARAMS _ScreenParams +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// API Macro +#if defined(TEXTURE2D) + #undef TEXTURE2D +#endif +#if defined(TEXTURE2D_FLOAT) + #undef TEXTURE2D_FLOAT +#endif +#if defined(TEXTURE2D_ARRAY) + #undef TEXTURE2D_ARRAY +#endif +#if defined(TEXTURE3D) + #undef TEXTURE3D +#endif +#if defined(TEXTURECUBE) + #undef TEXTURECUBE +#endif +#if defined(SAMPLER) + #undef SAMPLER +#endif + +#if defined(SHADER_API_D3D11_9X) + #define LIL_NOPERSPECTIVE + #define LIL_CENTROID +#else + #define LIL_NOPERSPECTIVE noperspective + #define LIL_CENTROID centroid +#endif +#define LIL_VECTOR_INTERPOLATION + +#if defined(SHADER_API_D3D9) + #undef LIL_ANTIALIAS_MODE + #define LIL_ANTIALIAS_MODE 0 +#endif + +#if defined(SHADER_API_D3D11_9X) + #define LIL_VFACE(facing) + #define LIL_COPY_VFACE(o) + #undef LIL_USE_LIGHTMAP +#elif defined(SHADER_API_GLCORE) || defined(SHADER_API_GLES) || defined(SHADER_API_D3D9) + #define LIL_VFACE(facing) , float facing : VFACE + #define LIL_COPY_VFACE(o) o = facing +#else + #define LIL_VFACE(facing) , bool isFrontFace : SV_IsFrontFace + #define LIL_COPY_VFACE(o) o = isFrontFace ? 1 : -1 +#endif + +#if defined(SHADER_API_MOBILE) || defined(SHADER_API_GLES) + #define LIL_NOT_SUPPORT_VERTEXID +#endif + +#if defined(SHADER_API_D3D9) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER)) || defined(SHADER_TARGET_SURFACE_ANALYSIS) + #define LIL_SAMPLE_1D(tex,samp,uv) tex2D(tex,float2(uv,0.5)) + #define LIL_SAMPLE_1D_LOD(tex,samp,uv,lod) tex2Dlod(tex,float4(uv,0.5,0,lod)) + #define LIL_SAMPLE_2D(tex,samp,uv) tex2D(tex,uv) + #define LIL_SAMPLE_2D_CS(tex,uv) tex2D(tex,uv/LIL_SCREENPARAMS.xy) + #define LIL_SAMPLE_2D_ST(tex,samp,uv) tex2D(tex,uv*tex##_ST.xy+tex##_ST.zw) + #define LIL_SAMPLE_2D_LOD(tex,samp,uv,lod) tex2Dlod(tex,float4(uv,0,lod)) + #define LIL_SAMPLE_2D_BIAS(tex,samp,uv,bias) tex2Dbias(tex,float4(uv,0,bias)) + #define LIL_SAMPLE_2D_GRAD(tex,samp,uv,dx,dy) tex2Dgrad(tex,uv,dx,dy) + #define LIL_SAMPLE_2D_ARRAY(tex,samp,uv,index) tex2DArray(tex,float3(uv,index)) + #define LIL_SAMPLE_2D_ARRAY_CS(tex,uv,index) tex2DArray(tex,float3(uv/LIL_SCREENPARAMS.xy,index)) + #define LIL_SAMPLE_2D_ARRAY_LOD(tex,samp,uv,index,lod) tex2DArraylod(tex,float4(uv,index,lod)) + #define LIL_SAMPLE_3D(tex,samp,uv) tex3D(tex,uv) + #define LIL_SAMPLE_CUBE_LOD(tex,samp,uv,lod) texCUBElod(tex,float4(uv,0,lod)) + #define TEXTURE2D(tex) sampler2D tex + #define TEXTURE2D_FLOAT(tex) sampler2D tex + #define TEXTURE2D_ARRAY(tex) sampler2DArray tex + #define TEXTURE3D(tex) sampler3D tex + #define TEXTURECUBE(tex) samplerCUBE tex + #define SAMPLER(samp) + #define LIL_SAMP_IN_FUNC(samp) + #define LIL_SAMP_IN(samp) + #define LIL_LWTEX + + bool IsEmpty(TEXTURECUBE(tex)) + { + return false; + } + + bool IsEmpty(TEXTURE2D(tex)) + { + return false; + } + + bool IsEmpty(TEXTURE2D_ARRAY(tex)) + { + return false; + } + + bool IsScreenTex(TEXTURE2D(tex)) + { + return false; + } + + bool IsScreenTex(TEXTURE2D_ARRAY(tex)) + { + return false; + } + + float lilSampleDither(TEXTURE3D(tex), float2 positionCS, float alpha) + { + return tex3D(tex, float3(positionCS*0.25,alpha*0.9375)).a; + } + + float4 lilSamplePointRepeat(TEXTURE2D(tex), float2 positionCS, float2 size) + { + uint2 uv = (uint2)positionCS.xy%(uint2)size; + return tex2D(tex, uv/size); + } + + float2 lilGetWidthAndHeight(TEXTURE2D(tex)) + { + return float2(0, 0); + } + + float2 lilGetWidthAndHeight(TEXTURE2D_ARRAY(tex)) + { + return float2(0, 0); + } +#else + #define LIL_SAMPLE_1D(tex,samp,uv) tex.Sample(samp,uv) + #define LIL_SAMPLE_1D_LOD(tex,samp,uv,lod) tex.SampleLevel(samp,uv,lod) + #define LIL_SAMPLE_2D(tex,samp,uv) tex.Sample(samp,uv) + #define LIL_SAMPLE_2D_CS(tex,uv) tex[uint2(uv)] + #define LIL_SAMPLE_2D_ST(tex,samp,uv) tex.Sample(samp,uv*tex##_ST.xy+tex##_ST.zw) + #define LIL_SAMPLE_2D_LOD(tex,samp,uv,lod) tex.SampleLevel(samp,uv,lod) + #define LIL_SAMPLE_2D_BIAS(tex,samp,uv,bias) tex.SampleBias(samp,uv,bias) + #define LIL_SAMPLE_2D_GRAD(tex,samp,uv,dx,dy) tex.SampleGrad(samp,uv,dx,dy) + #define LIL_SAMPLE_2D_ARRAY(tex,samp,uv,index) tex.Sample(samp,float3(uv,index)) + #define LIL_SAMPLE_2D_ARRAY_CS(tex,uv,index) tex[uint3(uv,index)] + #define LIL_SAMPLE_2D_ARRAY_LOD(tex,samp,uv,index,lod) tex.SampleLevel(samp,float3(uv,index),lod) + #define LIL_SAMPLE_3D(tex,samp,coord) tex.Sample(samp,coord) + #define LIL_SAMPLE_CUBE_LOD(tex,samp,uv,lod) tex.SampleLevel(samp,uv,lod) + #define TEXTURE2D(tex) Texture2D tex + #define TEXTURE2D_FLOAT(tex) Texture2D tex + #define TEXTURE2D_ARRAY(tex) Texture2DArray tex + #define TEXTURE3D(tex) Texture3D tex + #define TEXTURECUBE(tex) TextureCube tex + #define SAMPLER(samp) SamplerState samp + #define LIL_SAMP_IN_FUNC(samp) , SamplerState samp + #define LIL_SAMP_IN(samp) , samp + + bool IsEmpty(TEXTURECUBE(tex)) + { + uint width, height, levels; + tex.GetDimensions(0, width, height, levels); + return width < 15; + } + + bool IsEmpty(TEXTURE2D(tex)) + { + uint width, height; + tex.GetDimensions(width, height); + return width < 15; + } + + bool IsEmpty(TEXTURE2D_ARRAY(tex)) + { + uint width, height, element; + tex.GetDimensions(width, height, element); + return width < 15; + } + + bool IsScreenTex(TEXTURE2D(tex)) + { + uint width, height; + tex.GetDimensions(width, height); + return (abs(width - LIL_SCREENPARAMS.x) + abs(height - LIL_SCREENPARAMS.y)) < 1; + } + + bool IsScreenTex(TEXTURE2D_ARRAY(tex)) + { + uint width, height, element; + tex.GetDimensions(width, height, element); + return (abs(width - LIL_SCREENPARAMS.x) + abs(height - LIL_SCREENPARAMS.y)) < 1; + } + + float lilSampleDither(TEXTURE3D(tex), float2 positionCS, float alpha) + { + uint3 uv = uint3(positionCS, alpha*0.9375*16); + uv.xy = uv.xy % 4; + return tex[uv].a; + } + + float4 lilSamplePointRepeat(TEXTURE2D(tex), float2 positionCS, float2 size) + { + uint2 uv = (uint2)positionCS.xy%(uint2)size; + return tex[uv]; + } + + float2 lilGetWidthAndHeight(TEXTURE2D(tex)) + { + uint width, height; + tex.GetDimensions(width, height); + return float2(width, height); + } + + float2 lilGetWidthAndHeight(TEXTURE2D_ARRAY(tex)) + { + uint width, height, element; + tex.GetDimensions(width, height, element); + return float2(width, height); + } +#endif + +#if defined(LIL_FEATURE_PARALLAX) && defined(LIL_FEATURE_POM) + #define LIL_SAMPLE_2D_POM(tex,samp,uv,dx,dy) LIL_SAMPLE_2D_GRAD(tex,samp,uv,dx,dy) +#else + #define LIL_SAMPLE_2D_POM(tex,samp,uv,dx,dy) LIL_SAMPLE_2D(tex,samp,uv) +#endif + +#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) + #define TEXTURE2D_SCREEN(tex) TEXTURE2D_ARRAY(tex) + #define LIL_SAMPLE_SCREEN(tex,samp,uv) LIL_SAMPLE_2D_ARRAY(tex,samp,uv,(float)unity_StereoEyeIndex) + #define LIL_SAMPLE_SCREEN_LOD(tex,samp,uv,lod) LIL_SAMPLE_2D_ARRAY_LOD(tex,samp,uv,(float)unity_StereoEyeIndex,lod) + #define LIL_SAMPLE_SCREEN_CS(tex,uv) LIL_SAMPLE_2D_ARRAY_CS(tex,uv,unity_StereoEyeIndex) + +#else + #define TEXTURE2D_SCREEN(tex) TEXTURE2D(tex) + #define LIL_SAMPLE_SCREEN(tex,samp,uv) LIL_SAMPLE_2D(tex,samp,uv) + #define LIL_SAMPLE_SCREEN_LOD(tex,samp,uv,lod) LIL_SAMPLE_2D_LOD(tex,samp,uv,lod) + #define LIL_SAMPLE_SCREEN_CS(tex,uv) LIL_SAMPLE_2D_CS(tex,uv) +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Macro to absorb pipeline differences + +// Transform +#if defined(LIL_BRP) + #define LIL_MATRIX_M unity_ObjectToWorld + #define LIL_MATRIX_I_M unity_WorldToObject + #define LIL_MATRIX_V UNITY_MATRIX_V + #define LIL_MATRIX_VP UNITY_MATRIX_VP + #define LIL_MATRIX_P UNITY_MATRIX_P + #define LIL_NEGATIVE_SCALE unity_WorldTransformParams.w + + float3 lilTransformOStoWS(float4 positionOS) + { + return mul(LIL_MATRIX_M, positionOS).xyz; + } + + float3 lilTransformOStoWS(float3 positionOS) + { + return mul(LIL_MATRIX_M, float4(positionOS, 1.0)).xyz; + } + + float3 lilTransformWStoOS(float3 positionWS) + { + return mul(LIL_MATRIX_I_M, float4(positionWS, 1.0)).xyz; + } + + float3 lilTransformWStoVS(float3 positionWS) + { + return UnityWorldToViewPos(positionWS).xyz; + } + + float4 lilTransformWStoCS(float3 positionWS) + { + return UnityWorldToClipPos(positionWS); + } + + float4 lilTransformVStoCS(float3 positionVS) + { + return UnityViewToClipPos(positionVS); + } + + float4 lilTransformCStoSS(float4 positionCS) + { + return ComputeGrabScreenPos(positionCS); + } + + float4 lilTransformCStoSSFrag(float4 positionCS) + { + float4 positionSS = float4(positionCS.xyz * positionCS.w, positionCS.w); + positionSS.xy = positionSS.xy / LIL_SCREENPARAMS.xy; + return positionSS; + } +#else + #if defined(SHADER_STAGE_RAY_TRACING) + #define LIL_MATRIX_M ObjectToWorld3x4() + #define LIL_MATRIX_I_M WorldToObject3x4() + #else + #define LIL_MATRIX_M GetObjectToWorldMatrix() + #define LIL_MATRIX_I_M GetWorldToObjectMatrix() + #endif + #define LIL_MATRIX_V GetWorldToViewMatrix() + #define LIL_MATRIX_VP GetWorldToHClipMatrix() + #define LIL_MATRIX_P GetViewToHClipMatrix() + #define LIL_NEGATIVE_SCALE GetOddNegativeScale() + + float3 lilTransformOStoWS(float4 positionOS) + { + return TransformObjectToWorld(positionOS.xyz).xyz; + } + + float3 lilTransformOStoWS(float3 positionOS) + { + return mul(LIL_MATRIX_M, float4(positionOS, 1.0)).xyz; + } + + float3 lilTransformWStoOS(float3 positionWS) + { + return TransformWorldToObject(positionWS).xyz; + } + + float3 lilTransformWStoVS(float3 positionWS) + { + return TransformWorldToView(positionWS).xyz; + } + + float4 lilTransformWStoCS(float3 positionWS) + { + return TransformWorldToHClip(positionWS); + } + + float4 lilTransformVStoCS(float3 positionVS) + { + return TransformWViewToHClip(positionVS); + } + + float4 lilTransformCStoSS(float4 positionCS) + { + float4 positionSS = positionCS * 0.5f; + positionSS.xy = float2(positionSS.x, positionSS.y * _ProjectionParams.x) + positionSS.w; + positionSS.zw = positionCS.zw; + return positionSS; + } + + float4 lilTransformCStoSSFrag(float4 positionCS) + { + float4 positionSS = float4(positionCS.xyz * positionCS.w, positionCS.w); + positionSS.xy = positionSS.xy / LIL_SCREENPARAMS.xy; + return positionSS; + } +#endif + +// Stereo +#if defined(LIL_HDRP) + #if LIL_SRP_VERSION_GREATER_EQUAL(7, 1) + #define LIL_STEREO_MATRIX_V(i) _XRViewMatrix[i] + #define LIL_STEREO_CAMERA_POS(i) _XRWorldSpaceCameraPos[i] + #else + #define LIL_STEREO_MATRIX_V(i) _XRViewConstants[i].viewMatrix + #define LIL_STEREO_CAMERA_POS(i) _XRViewConstants[i].worldSpaceCameraPos + #endif +#else + #define LIL_STEREO_MATRIX_V(i) unity_StereoMatrixV[i] + #define LIL_STEREO_CAMERA_POS(i) unity_StereoWorldSpaceCameraPos[i] +#endif + +float3 lilToAbsolutePositionWS(float3 positionRWS) +{ + #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + return positionRWS + _WorldSpaceCameraPos.xyz; + #else + return positionRWS; + #endif +} + +float3 lilToRelativePositionWS(float3 positionWS) +{ + #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + return positionWS - _WorldSpaceCameraPos.xyz; + #else + return positionWS; + #endif +} + +float3 lilTransformDirOStoWS(float3 directionOS, bool doNormalize) +{ + if(doNormalize) return normalize(mul((float3x3)LIL_MATRIX_M, directionOS)); + else return mul((float3x3)LIL_MATRIX_M, directionOS); +} + +float3 lilTransformDirWStoOS(float3 directionWS, bool doNormalize) +{ + if(doNormalize) return normalize(mul((float3x3)LIL_MATRIX_I_M, directionWS)); + else return mul((float3x3)LIL_MATRIX_I_M, directionWS); +} + +float3 lilTransformNormalOStoWS(float3 normalOS, bool doNormalize) +{ + #ifdef UNITY_ASSUME_UNIFORM_SCALING + return lilTransformDirOStoWS(normalOS, doNormalize); + #else + if(doNormalize) return normalize(mul(normalOS, (float3x3)LIL_MATRIX_I_M)); + else return mul(normalOS, (float3x3)LIL_MATRIX_I_M); + #endif +} + +bool lilIsPerspective() +{ + #if defined(LIL_HDRP) && defined(SHADERPASS) && (SHADERPASS == SHADERPASS_SHADOWS) + return LIL_MATRIX_P._m33 == 0; + #else + return unity_OrthoParams.w == 0; + #endif +} + +float3 lilViewDirection(float3 positionWS) +{ + return _WorldSpaceCameraPos.xyz - positionWS; +} + +float3 lilHeadDirection(float3 positionWS) +{ + #if defined(USING_STEREO_MATRICES) + return (LIL_STEREO_CAMERA_POS(0).xyz + LIL_STEREO_CAMERA_POS(1).xyz) * 0.5 - positionWS; + #else + return lilViewDirection(positionWS); + #endif +} + +float3 lilCameraDirection() +{ + #if defined(USING_STEREO_MATRICES) + return normalize(LIL_STEREO_MATRIX_V(0)._m20_m21_m22 + LIL_STEREO_MATRIX_V(1)._m20_m21_m22); + #else + return LIL_MATRIX_V._m20_m21_m22; + #endif +} + +float3 lilCameraUp() +{ + return LIL_MATRIX_V._m10_m11_m12; +} + +float3 lilCameraRight() +{ + #if defined(USING_STEREO_MATRICES) + return cross(lilCameraDirection(), lilCameraUp()); + #else + return LIL_MATRIX_V._m00_m01_m02; + #endif +} + +float3 lilViewDirectionOS(float3 positionOS) +{ + #if defined(LIL_HDRP) + return lilTransformWStoOS(lilToRelativePositionWS(_WorldSpaceCameraPos.xyz)) - positionOS; + #else + return lilTransformWStoOS(_WorldSpaceCameraPos.xyz) - positionOS; + #endif +} + +float3 lilHeadDirectionOS(float3 positionOS) +{ + #if defined(USING_STEREO_MATRICES) + return lilTransformWStoOS((LIL_STEREO_CAMERA_POS(0).xyz + LIL_STEREO_CAMERA_POS(1).xyz) * 0.5) - positionOS; + #else + return lilViewDirectionOS(positionOS); + #endif +} + +float2 lilCStoGrabUV(float4 positionCS) +{ + float2 uvScn = positionCS.xy / LIL_SCREENPARAMS.xy; + #if defined(UNITY_SINGLE_PASS_STEREO) + uvScn.xy = TransformStereoScreenSpaceTex(uvScn.xy, 1.0); + #endif + return uvScn; +} + +float3 lilTransformDirWStoVSCenter(float3 directionWS, bool doNormalize) +{ + #if defined(USING_STEREO_MATRICES) + if(doNormalize) return normalize(mul((float3x3)LIL_STEREO_MATRIX_V(0), directionWS) + mul((float3x3)LIL_STEREO_MATRIX_V(1), directionWS)); + else return mul((float3x3)LIL_STEREO_MATRIX_V(0), directionWS) + mul((float3x3)LIL_STEREO_MATRIX_V(1), directionWS); + #else + if(doNormalize) return normalize(mul((float3x3)LIL_MATRIX_V, directionWS)); + else return mul((float3x3)LIL_MATRIX_V, directionWS); + #endif +} + +float3 lilTransformDirWStoVSCenter(float3 directionWS) +{ + return lilTransformDirWStoVSCenter(directionWS, false); +} + +float3 lilBlendVRParallax(float3 a, float3 b, float c) +{ + #if defined(USING_STEREO_MATRICES) + return lerp(a, b, c); + #else + return b; + #endif +} + +float lilLinearEyeDepth(float z) +{ + //return LIL_MATRIX_P._m23 / (z - LIL_MATRIX_P._m22 / LIL_MATRIX_P._m32); + return LIL_MATRIX_P._m23 / (z + LIL_MATRIX_P._m22); +} + +float lilLinearEyeDepth(float z, float2 positionCS) +{ + float2 pos = positionCS / LIL_SCREENPARAMS.xy * 2.0 - 1.0; + #if UNITY_UV_STARTS_AT_TOP + pos.y = -pos.y; + #endif + return LIL_MATRIX_P._m23 / (z + LIL_MATRIX_P._m22 + - LIL_MATRIX_P._m20 / LIL_MATRIX_P._m00 * (pos.x +LIL_MATRIX_P._m02) + - LIL_MATRIX_P._m21 / LIL_MATRIX_P._m11 * (pos.y +LIL_MATRIX_P._m12) + ); +} + +float2 lilCameraDepthTexel(float2 positionCS) +{ + float2 uv = positionCS.xy; + #if UNITY_UV_STARTS_AT_TOP + if(_ProjectionParams.x > 0) uv.y = LIL_SCREENPARAMS.y - uv.y; + #else + if(_ProjectionParams.x < 0) uv.y = LIL_SCREENPARAMS.y - uv.y; + #endif + return uv; +} + +float3 lilGetObjectPosition() +{ + return lilTransformOStoWS(float3(0,0,0)); +} + +/* +// Built-in RP +#define UnityWorldToViewPos(positionWS) lilTransformWStoVS(positionWS) +#define UnityWorldToClipPos(positionWS) lilTransformWStoCS(positionWS) +#define UnityViewToClipPos(positionVS) lilTransformVStoCS(positionVS) +#define ComputeGrabScreenPos(positionCS) lilTransformCStoSS(positionCS) +#define UnityWorldSpaceViewDir(positionWS) lilViewDirection(positionWS) +#define UnityObjectToWorldDir(directionOS) lilTransformDirOStoWS(directionOS) +#define UnityWorldToObjectDir(directionWS) lilTransformDirWStoOS(directionWS) +#define UnityObjectToWorldNormal(normalOS) lilTransformNormalOStoWS(normalOS) +#define UnityWorldSpaceViewDir(positionWS) lilViewDirection(positionWS) + +// SRP +#define TransformObjectToWorld(positionOS) lilTransformOStoWS(positionOS) +#define TransformWorldToObject(positionWS) lilTransformWStoOS(positionWS) +#define TransformWorldToView(positionWS) lilTransformWStoVS(positionWS) +#define TransformWorldToHClip(positionWS) lilTransformWStoCS(positionWS) +#define TransformWViewToHClip(positionVS) lilTransformVStoCS(positionVS) +#define TransformObjectToWorldDir(directionOS,doNormalize) lilTransformDirOStoWS(directionOS,doNormalize) +#define TransformWorldToObjectDir(directionWS,doNormalize) lilTransformDirWStoOS(directionWS,doNormalize) +#define TransformObjectToWorldNormal(normalOS,doNormalize) lilTransformNormalOStoWS(normalOS,doNormalize) +#define GetAbsolutePositionWS(positionRWS) lilToAbsolutePositionWS(float3 positionRWS) +*/ + +// Lighting +#if defined(LIL_BRP) + // 2017 + #ifndef EDITORVIZ_TEXTURE + #undef EDITOR_VISUALIZATION + #endif + #ifndef UNITY_TRANSFER_LIGHTING + #define UNITY_TRANSFER_LIGHTING(a,b) TRANSFER_SHADOW(a) + #endif + + // HDRP Data + uint lilGetRenderingLayer() + { + return 0; + } + #define LIL_GET_HDRPDATA(input,fd) + #define LIL_HDRP_DEEXPOSURE(col) + #define LIL_HDRP_INVDEEXPOSURE(col) + + // Main light + #define LIL_MAINLIGHT_COLOR _LightColor0.rgb + #define LIL_MAINLIGHT_DIRECTION _WorldSpaceLightPos0.xyz + + // Shadow + #if defined(LIL_USE_SHADOW) && !defined(LIL_PASS_FORWARDADD) + #define LIL_SHADOW_COORDS(idx) UNITY_SHADOW_COORDS(idx) + #define LIL_TRANSFER_SHADOW(vi,uv,o) \ + DummyStructure v; \ + v.vertex = input.positionOS; \ + BRPShadowCoords brpShadowCoords; \ + LIL_INITIALIZE_STRUCT(BRPShadowCoords, brpShadowCoords); \ + brpShadowCoords.pos = vi.positionCS; \ + UNITY_TRANSFER_LIGHTING(brpShadowCoords, uv) \ + o._ShadowCoord = brpShadowCoords._ShadowCoord + #define LIL_LIGHT_ATTENUATION(atten,i) \ + BRPShadowCoords brpShadowCoords; \ + brpShadowCoords.pos = i.positionCS; \ + brpShadowCoords._ShadowCoord = i._ShadowCoord; \ + UNITY_LIGHT_ATTENUATION(attenuationOrig, brpShadowCoords, i.positionWS); \ + atten = attenuationOrig + #elif (UNITY_VERSION < 201820) && !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) || !defined(LIL_PASS_FORWARDADD) + #define LIL_SHADOW_COORDS(idx) + #define LIL_TRANSFER_SHADOW(vi,uv,o) + #define LIL_LIGHT_ATTENUATION(atten,i) + #else + #if defined(POINT) + #define LIL_CALC_LIGHT_COORDS(o,i) o._LightCoord = mul(unity_WorldToLight, float4(i.positionWS, 1.0)).xyz; + #elif defined(SPOT) + #define LIL_CALC_LIGHT_COORDS(o,i) o._LightCoord = mul(unity_WorldToLight, float4(i.positionWS, 1.0)); + #elif defined(POINT_COOKIE) + #define LIL_CALC_LIGHT_COORDS(o,i) o._LightCoord = mul(unity_WorldToLight, float4(i.positionWS, 1.0)).xyz; + #elif defined(DIRECTIONAL_COOKIE) + #define LIL_CALC_LIGHT_COORDS(o,i) o._LightCoord = mul(unity_WorldToLight, float4(i.positionWS, 1.0)).xy; + #else + #define LIL_CALC_LIGHT_COORDS(o,i) + #endif + + #define LIL_SHADOW_COORDS(idx) UNITY_SHADOW_COORDS(idx) + #if defined(SHADOWS_DEPTH) && defined(SPOT) || defined(SHADOWS_SCREEN) && defined(UNITY_NO_SCREENSPACE_SHADOWS) + #define LIL_TRANSFER_SHADOW(vi,uv,o) o._ShadowCoord = mul(unity_WorldToShadow[0], float4(vi.positionWS.xyz, 1)); + #elif defined(SHADOWS_CUBE) + #define LIL_TRANSFER_SHADOW(vi,uv,o) o._ShadowCoord.xyz = fd.positionWS.xyz - _LightPositionRange.xyz; + #elif defined(SHADOWS_SCREEN) + #define LIL_TRANSFER_SHADOW(vi,uv,o) o._ShadowCoord = float4(vi.positionCS.xy / LIL_SCREENPARAMS.xy, 1, 1); + #else + #define LIL_TRANSFER_SHADOW(vi,uv,o) + #endif + + #define LIL_LIGHT_ATTENUATION(atten,i) \ + BRPShadowCoords brpShadowCoords; \ + brpShadowCoords.pos = i.positionCS; \ + LIL_CALC_LIGHT_COORDS(brpShadowCoords,i) \ + LIL_TRANSFER_SHADOW(fd,fd.uv1,brpShadowCoords) \ + UNITY_LIGHT_ATTENUATION(attenuationOrig, brpShadowCoords, i.positionWS); \ + atten = attenuationOrig + #endif + struct BRPShadowCoords + { + float4 pos; + LIL_SHADOW_COORDS(0) + #if defined(DECLARE_LIGHT_COORDS) + DECLARE_LIGHT_COORDS(1) + #elif defined(POINT) + unityShadowCoord3 _LightCoord : TEXCOORD1; + #elif defined(SPOT) + unityShadowCoord4 _LightCoord : TEXCOORD1; + #elif defined(POINT_COOKIE) + unityShadowCoord3 _LightCoord : TEXCOORD1; + #elif defined(DIRECTIONAL_COOKIE) + unityShadowCoord2 _LightCoord : TEXCOORD1; + #endif + }; + struct DummyStructure + { + float4 vertex; + }; + + + // Shadow caster + #define LIL_V2F_SHADOW_CASTER_OUTPUT V2F_SHADOW_CASTER_NOPOS float4 positionCS : SV_POSITION; + #if defined(SHADOWS_CUBE) && !defined(SHADOWS_CUBE_IN_DEPTH_TEX) + #define LIL_TRANSFER_SHADOW_CASTER(v,o) \ + o.vec = mul(unity_ObjectToWorld, v.positionOS).xyz - _LightPositionRange.xyz; \ + o.positionCS = UnityObjectToClipPos(v.positionOS) + #else + float4 lilClipSpaceShadowCasterPos(float4 positionOS, float3 normalOS, float bias) + { + #if defined(SHADOWS_DEPTH) + if(LIL_MATRIX_P._m33 == 0.0) bias = 0; + #endif + float4 positionWS = mul(unity_ObjectToWorld, float4(positionOS.xyz, 1)); + float3 L = normalize(UnityWorldSpaceLightDir(positionWS.xyz)); + positionWS.xyz -= L * bias; + + if(unity_LightShadowBias.z != 0.0) + { + float3 normalWS = UnityObjectToWorldNormal(normalOS); + float shadowCos = dot(normalWS, L); + float shadowSine = sqrt(1-shadowCos*shadowCos); + float normalBias = unity_LightShadowBias.z * shadowSine; + + positionWS.xyz -= normalWS * normalBias; + } + + return mul(UNITY_MATRIX_VP, positionWS); + } + #define LIL_TRANSFER_SHADOW_CASTER(v,o) \ + o.positionCS = lilClipSpaceShadowCasterPos(v.positionOS, v.normalOS, _lilShadowCasterBias); \ + o.positionCS = UnityApplyLinearShadowBias(o.positionCS) + #endif + #define LIL_SHADOW_CASTER_FRAGMENT(i) SHADOW_CASTER_FRAGMENT(i) + + // Additional Light + void lilGetAdditionalLights(float3 positionWS, float4 positionCS, float strength, inout float3 lightColor, inout float3 lightDirection) + { + #if defined(LIGHTPROBE_SH) && defined(VERTEXLIGHT_ON) + float4 toLightX = unity_4LightPosX0 - positionWS.x; + float4 toLightY = unity_4LightPosY0 - positionWS.y; + float4 toLightZ = unity_4LightPosZ0 - positionWS.z; + + float4 lengthSq = toLightX * toLightX + 0.000001; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + //float4 atten = 1.0 / (1.0 + lengthSq * unity_4LightAtten0); + float4 atten = saturate(saturate((25.0 - lengthSq * unity_4LightAtten0) * 0.111375) / (0.987725 + lengthSq * unity_4LightAtten0)) * strength; + + lightColor += unity_LightColor[0].rgb * atten.x; + lightColor += unity_LightColor[1].rgb * atten.y; + lightColor += unity_LightColor[2].rgb * atten.z; + lightColor += unity_LightColor[3].rgb * atten.w; + + lightDirection += lilLuminance(unity_LightColor[0].rgb) * atten.x / sqrt(lengthSq.x) * float3(toLightX.x, toLightY.x, toLightZ.x); + lightDirection += lilLuminance(unity_LightColor[1].rgb) * atten.y / sqrt(lengthSq.y) * float3(toLightX.y, toLightY.y, toLightZ.y); + lightDirection += lilLuminance(unity_LightColor[2].rgb) * atten.z / sqrt(lengthSq.z) * float3(toLightX.z, toLightY.z, toLightZ.z); + lightDirection += lilLuminance(unity_LightColor[3].rgb) * atten.w / sqrt(lengthSq.w) * float3(toLightX.w, toLightY.w, toLightZ.w); + #endif + } + + float3 lilGetAdditionalLights(float3 positionWS, float4 positionCS, float strength) + { + float3 lightColor = 0.0; + float3 lightDirection = 0.0; + lilGetAdditionalLights(positionWS, positionCS, strength, lightColor, lightDirection); + return saturate(lightColor); + } + + // Lightmap + #define LIL_DECODE_LIGHTMAP(lm) DecodeLightmap(lm) + #define LIL_DECODE_DYNAMICLIGHTMAP(lm) DecodeRealtimeLightmap(lm) + + // Environment reflection + UnityGIInput lilSetupGIInput(float3 positionWS) + { + UnityGIInput data; + LIL_INITIALIZE_STRUCT(UnityGIInput, data); + data.worldPos = positionWS; + data.probeHDR[0] = unity_SpecCube0_HDR; + data.probeHDR[1] = unity_SpecCube1_HDR; + #if defined(UNITY_SPECCUBE_BLENDING) || defined(UNITY_SPECCUBE_BOX_PROJECTION) + data.boxMin[0] = unity_SpecCube0_BoxMin; + #endif + #ifdef UNITY_SPECCUBE_BOX_PROJECTION + data.boxMax[0] = unity_SpecCube0_BoxMax; + data.probePosition[0] = unity_SpecCube0_ProbePosition; + data.boxMax[1] = unity_SpecCube1_BoxMax; + data.boxMin[1] = unity_SpecCube1_BoxMin; + data.probePosition[1] = unity_SpecCube1_ProbePosition; + #endif + return data; + } + Unity_GlossyEnvironmentData lilSetupGlossyEnvironmentData(float3 viewDirection, float3 normalDirection, float perceptualRoughness) + { + Unity_GlossyEnvironmentData glossIn; + glossIn.roughness = perceptualRoughness; + glossIn.reflUVW = reflect(-viewDirection,normalDirection); + return glossIn; + } + float3 lilGetEnvReflection(float3 viewDirection, float3 normalDirection, float perceptualRoughness, float3 positionWS) + { + UnityGIInput data = lilSetupGIInput(positionWS); + Unity_GlossyEnvironmentData glossIn = lilSetupGlossyEnvironmentData(viewDirection,normalDirection,perceptualRoughness); + return UnityGI_IndirectSpecular(data, 1.0, glossIn); + } + #define LIL_GET_ENVIRONMENT_REFLECTION(viewDirection,normalDirection,perceptualRoughness,positionWS) \ + ((IsEmpty(unity_SpecCube0) || unity_SpecCube0_HDR.x == 0 || _ReflectionCubeOverride) ? \ + lilCustomReflection(_ReflectionCubeTex, _ReflectionCubeTex_HDR, viewDirection, normalDirection, perceptualRoughness) * _ReflectionCubeColor.rgb * lerp(1.0, fd.lightColor, _ReflectionCubeEnableLighting) : \ + lilGetEnvReflection(viewDirection,normalDirection,perceptualRoughness,positionWS)) + + // Fog + #if defined(LIL_PASS_FORWARDADD) + #define LIL_FOG_COLOR float4(0,0,0,0) + #else + #define LIL_FOG_COLOR unity_FogColor + #endif + #if LIL_RENDER == 2 + #define LIL_APPLY_FOG_BASE(col,fogCoord) UNITY_FOG_LERP_COLOR(col,LIL_FOG_COLOR*col.a,fogCoord) + #define LIL_APPLY_FOG_COLOR_BASE(col,fogCoord,fogColor) UNITY_FOG_LERP_COLOR(col,fogColor*col.a,fogCoord) + #else + #define LIL_APPLY_FOG_BASE(col,fogCoord) UNITY_FOG_LERP_COLOR(col,LIL_FOG_COLOR,fogCoord) + #define LIL_APPLY_FOG_COLOR_BASE(col,fogCoord,fogColor) UNITY_FOG_LERP_COLOR(col,fogColor,fogCoord) + #endif + float lilCalcFogFactor(float depth) + { + #if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2) + UNITY_CALC_FOG_FACTOR(depth); + return unityFogFactor; + #else + return 1.0; + #endif + } + + // Meta + #define MetaInput UnityMetaInput + #define MetaFragment(input) UnityMetaFragment(input) + #define MetaVertexPosition(pos,uv1,uv2,l,d) UnityMetaVertexPosition(pos,uv1,uv2,l,d) +#elif defined(LIL_HDRP) + #define LIGHT_SIMULATE_HQ + + // Support for old version + #if LIL_SRP_VERSION_LOWER(4, 1) + #define LIL_HDRP_IGNORE_LIGHTDIMMER + float4 EvaluateAtmosphericScattering(PositionInputs posInput, float3 viewDirection, float4 col) + { + return EvaluateAtmosphericScattering(posInput, col); + } + #endif + + #if LIL_SRP_VERSION_LOWER(4, 2) + float GetDirectionalShadowAttenuation(HDShadowContext shadowContext, float2 positionSS, float3 positionWS, float3 normalWS, int shadowIndex, float3 L) + { + return GetDirectionalShadowAttenuation(shadowContext, positionWS, normalWS, shadowIndex, L, positionSS); + } + #endif + + #if LIL_SRP_VERSION_LOWER(5, 3) + float GetCurrentExposureMultiplier() + { + return 1.0; + } + #endif + + #if LIL_SRP_VERSION_LOWER(6, 6) + float3 SampleCameraColor(float2 uv, float lod) + { + return LIL_SAMPLE_2D_LOD(_ColorPyramidTexture, s_trilinear_clamp_sampler, uv, lod).rgb; + } + #endif + + #if LIL_SRP_VERSION_LOWER(6, 8) + float4 EvaluateLight_Directional(LightLoopContext lightLoopContext, PositionInputs posInput, DirectionalLightData light) + { + float4 color = float4(light.color.rgb, 1.0); + + #if LIL_SRP_VERSION_GREATER_EQUAL(4, 1) + float cosZenithAngle = -light.forward.y; + float fragmentHeight = posInput.positionWS.y; + color.a = TransmittanceHeightFog(_HeightFogBaseExtinction, _HeightFogBaseHeight, _HeightFogExponents, cosZenithAngle, fragmentHeight); + #endif + + if(light.cookieIndex >= 0) + { + float3 lightToSample = posInput.positionWS - light.positionRWS; + float3 cookie = EvaluateCookie_Directional(lightLoopContext, light, lightToSample); + color.rgb *= cookie; + } + + return color; + } + + void GetPunctualLightVectors(float3 positionWS, LightData light, out float3 L, out float4 distances) + { + float3 lightToSample; + GetPunctualLightVectors(positionWS, light, L, lightToSample, distances); + } + #endif + + #if LIL_SRP_VERSION_LOWER(7, 1) + float3 TransformPreviousObjectToWorld(float3 previousPositionOS) + { + float4x4 previousModelMatrix = ApplyCameraTranslationToMatrix(unity_MatrixPreviousM); + return mul(previousModelMatrix, float4(previousPositionOS, 1.0)).xyz; + } + #endif + + float3 lilSelectPreviousPosition(float3 previousPositionOS, float3 positionOS) + { + return unity_MotionVectorsParams.x > 0 ? previousPositionOS : positionOS; + } + + float3 lilTransformPreviousObjectToWorld(float3 previousPositionOS) + { + return TransformPreviousObjectToWorld(previousPositionOS); + } + + float2 lilCalculateMotionVector(float4 positionCS, float4 previousPositionCS) + { + if(unity_MotionVectorsParams.y == 0) return float2(2.0, 0.0); + + positionCS.xy = positionCS.xy / LIL_SCREENPARAMS.xy * 2.0 - 1.0; + #if UNITY_UV_STARTS_AT_TOP + positionCS.y = -positionCS.y; + #endif + previousPositionCS.xy = previousPositionCS.xy / previousPositionCS.w; + float2 motionVec = (positionCS.xy - previousPositionCS.xy); + + float2 microThreshold = 0.01f * _ScreenSize.zw; + motionVec.x = abs(motionVec.x) < microThreshold.x ? 0 : motionVec.x; + motionVec.y = abs(motionVec.y) < microThreshold.y ? 0 : motionVec.y; + motionVec = clamp(motionVec, -1.0f + microThreshold, 1.0f - microThreshold); + motionVec *= 0.5; + + #if UNITY_UV_STARTS_AT_TOP + motionVec.y = -motionVec.y; + #endif + return motionVec; + } + + #define LIL_MATRIX_PREV_VP UNITY_MATRIX_PREV_VP + + #if LIL_SRP_VERSION_LOWER(11, 0) + #define LIL_HDRP_DEEXPOSURE(col) + #define LIL_HDRP_INVDEEXPOSURE(col) + #else + #define LIL_HDRP_DEEXPOSURE(col) col.rgb *= _DeExposureMultiplier + #define LIL_HDRP_INVDEEXPOSURE(col) col.rgb /= _DeExposureMultiplier + #endif + + float4 SampleEnv(LightLoopContext lightLoopContext, PositionInputs posInput, EnvLightData lightData, float3 reflUVW, float lod) + { + #if LIL_SRP_VERSION_GREATER_EQUAL(10, 1) + float4 reflectionCol = SampleEnv(lightLoopContext, lightData.envIndex, reflUVW, lod * lightData.roughReflections, lightData.rangeCompressionFactorCompensation, posInput.positionNDC); + #elif LIL_SRP_VERSION_GREATER_EQUAL(7, 1) + float4 reflectionCol = SampleEnv(lightLoopContext, lightData.envIndex, reflUVW, lod, lightData.rangeCompressionFactorCompensation); + #else + float4 reflectionCol = SampleEnv(lightLoopContext, lightData.envIndex, reflUVW, lod); + #endif + LIL_HDRP_INVDEEXPOSURE(reflectionCol); + return reflectionCol; + } + + //------------------------------------------------------------------------------------------------------------------------------ + // HDRP Data + uint lilGetRenderingLayer() + { + #if !defined(DEFAULT_LIGHT_LAYERS) + return _EnableLightLayers ? asuint(unity_RenderingLayer.x) & RENDERING_LAYERS_MASK : RENDERING_LAYERS_MASK; + #elif defined(RENDERING_LIGHT_LAYERS_MASK) + return _EnableLightLayers ? (asuint(unity_RenderingLayer.x) & RENDERING_LIGHT_LAYERS_MASK) >> RENDERING_LIGHT_LAYERS_MASK_SHIFT : DEFAULT_LIGHT_LAYERS; + #else + return _EnableLightLayers ? asuint(unity_RenderingLayer.x) : DEFAULT_LIGHT_LAYERS; + #endif + } + + struct lilNPRLightingData + { + float3 color; + float3 direction; + }; + + LightLoopContext lilInitLightLoopContext() + { + LightLoopContext lightLoopContext; + lightLoopContext.shadowContext = InitShadowContext(); + lightLoopContext.shadowValue = 1; + lightLoopContext.sampleReflection = 0; + lightLoopContext.contactShadow = 0; + #if LIL_SRP_VERSION_GREATER_EQUAL(6, 7) + real contactShadowFade; + #endif + #if LIL_SRP_VERSION_GREATER_EQUAL(12, 1) + real splineVisibility; + #endif + #if defined(APPLY_FOG_ON_SKY_REFLECTIONS) + lightLoopContext.positionWS = 0; + #endif + return lightLoopContext; + } + + #define LIL_GET_HDRPDATA(input,fd) \ + fd.renderingLayers = lilGetRenderingLayer(); \ + fd.featureFlags = LIGHT_FEATURE_MASK_FLAGS_OPAQUE; \ + fd.tileIndex = uint2(0,0); \ + PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, input.positionCS.z, input.positionCS.w, input.positionWS, fd.tileIndex) + + //------------------------------------------------------------------------------------------------------------------------------ + // Direction Light + bool lilUseScreenSpaceShadow(int screenSpaceShadowIndex) + { + #if defined(SCREEN_SPACE_SHADOW_INDEX_MASK) && defined(INVALID_SCREEN_SPACE_SHADOW) + return (screenSpaceShadowIndex & SCREEN_SPACE_SHADOW_INDEX_MASK) != INVALID_SCREEN_SPACE_SHADOW; + #else + return screenSpaceShadowIndex >= 0; + #endif + } + + float4 lilGetDirectionalLightColor(PositionInputs posInput, DirectionalLightData light) + { + LightLoopContext lightLoopContext = lilInitLightLoopContext(); + return EvaluateLight_Directional(lightLoopContext, posInput, light); + } + + lilNPRLightingData lilGetNPRDirectionalLight(PositionInputs posInput, DirectionalLightData light) + { + lilNPRLightingData lighting = (lilNPRLightingData)0; + float3 L = -light.forward; + #if !defined(LIL_HDRP_IGNORE_LIGHTDIMMER) + if(light.lightDimmer > 0) + #endif + { + float4 lightColor = lilGetDirectionalLightColor(posInput, light); + lightColor.rgb *= lightColor.a; + + lighting.direction = L; + lighting.color = lightColor.rgb; + } + return lighting; + } + + void lilBlendlilNPRLightingData(inout lilNPRLightingData dst, lilNPRLightingData src) + { + dst.color += src.color; + dst.direction += src.direction * Luminance(src.color); + } + + float lilGetDirectionalShadow(PositionInputs posInput, float3 normalWS, uint featureFlags, float bias) + { + float attenuation = 1.0; + if(featureFlags & LIGHTFEATUREFLAGS_DIRECTIONAL) + { + HDShadowContext shadowContext = InitShadowContext(); + if(_DirectionalShadowIndex >= 0) + { + DirectionalLightData light = _DirectionalLightDatas[_DirectionalShadowIndex]; + #if defined(SCREEN_SPACE_SHADOWS_ON) + if(lilUseScreenSpaceShadow(light.screenSpaceShadowIndex)) + { + attenuation = GetScreenSpaceShadow(posInput, light.screenSpaceShadowIndex); + } + else + #endif + { + float3 L = -light.forward; + #if !defined(LIL_HDRP_IGNORE_LIGHTDIMMER) + if((light.lightDimmer > 0) && (light.shadowDimmer > 0)) + #endif + { + float3 positionWS = posInput.positionWS + L * bias; + attenuation = GetDirectionalShadowAttenuation(shadowContext, posInput.positionSS, positionWS, normalWS, light.shadowIndex, L); + } + } + } + } + return attenuation; + } + + float lilGetDirectionalShadow(PositionInputs posInput, float3 normalWS, uint featureFlags) + { + return lilGetDirectionalShadow(posInput, normalWS, featureFlags, 0.0); + } + + lilNPRLightingData lilGetDirectionalLightSum(PositionInputs posInput, uint renderingLayers, uint featureFlags) + { + lilNPRLightingData lightingData; + lightingData.color = 0.0; + lightingData.direction = 0.0; + if(featureFlags & LIGHTFEATUREFLAGS_DIRECTIONAL) + { + for(uint i = 0; i < _DirectionalLightCount; ++i) + { + if((_DirectionalLightDatas[i].lightLayers & renderingLayers) != 0) + { + lilNPRLightingData lighting = lilGetNPRDirectionalLight(posInput, _DirectionalLightDatas[i]); + lilBlendlilNPRLightingData(lightingData, lighting); + } + } + } + + lightingData.direction = dot(lightingData.direction,lightingData.direction) < 0.000001 ? 0 : normalize(lightingData.direction); + + #ifdef LIGHT_SIMULATE_HQ + lightingData.color = 0.0; + if(featureFlags & LIGHTFEATUREFLAGS_DIRECTIONAL) + { + for(uint i = 0; i < _DirectionalLightCount; ++i) + { + if((_DirectionalLightDatas[i].lightLayers & renderingLayers) != 0) + { + lilNPRLightingData lighting = lilGetNPRDirectionalLight(posInput, _DirectionalLightDatas[i]); + lightingData.color += lighting.color * saturate(dot(lightingData.direction, lighting.direction)); + } + } + } + #endif + + return lightingData; + } + + void lilGetLightDirectionAndColor(out float3 lightDirection, out float3 lightColor, PositionInputs posInput) + { + uint renderingLayers = lilGetRenderingLayer(); + uint featureFlags = LIGHT_FEATURE_MASK_FLAGS_OPAQUE; + + lilNPRLightingData lightingData = lilGetDirectionalLightSum(posInput, renderingLayers, featureFlags); + lightDirection = lightingData.direction; + lightColor = lightingData.color; + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Punctual Light (Point / Spot) + float4 EvaluateLight_Punctual(LightLoopContext lightLoopContext, float3 positionWS, LightData light, float3 L, float4 distances) + { + float4 color = float4(light.color.rgb, 1.0); + color.a *= PunctualLightAttenuation(distances, light.rangeAttenuationScale, light.rangeAttenuationBias, light.angleScale, light.angleOffset); + + #if !defined(LIGHT_EVALUATION_NO_HEIGHT_FOG) && LIL_SRP_VERSION_GREATER_EQUAL(4, 1) + float cosZenithAngle = L.y; + float distToLight = (light.lightType == GPULIGHTTYPE_PROJECTOR_BOX) ? distances.w : distances.x; + float fragmentHeight = positionWS.y; + color.a *= TransmittanceHeightFog(_HeightFogBaseExtinction, _HeightFogBaseHeight, _HeightFogExponents, cosZenithAngle, fragmentHeight, distToLight); + #endif + + #if LIL_SRP_VERSION_LOWER(7, 2) + if(light.cookieIndex >= 0) + #else + if(light.cookieMode != COOKIEMODE_NONE) + #endif + { + float3 lightToSample = positionWS - light.positionRWS; + float4 cookie = EvaluateCookie_Punctual(lightLoopContext, light, lightToSample); + color *= cookie; + } + + return color; + } + + lilNPRLightingData lilGetNPRPunctualLight(float3 positionWS, LightData light) + { + lilNPRLightingData lighting = (lilNPRLightingData)0; + float3 L; + float4 distances; + GetPunctualLightVectors(positionWS, light, L, distances); + #if !defined(LIL_HDRP_IGNORE_LIGHTDIMMER) + if(light.lightDimmer > 0) + #endif + { + LightLoopContext lightLoopContext; + lightLoopContext.shadowContext = InitShadowContext(); + lightLoopContext.shadowValue = 1; + lightLoopContext.sampleReflection = 0; + lightLoopContext.contactShadow = 0; + + float4 lightColor = EvaluateLight_Punctual(lightLoopContext, positionWS, light, L, distances); + #if !defined(LIL_HDRP_IGNORE_LIGHTDIMMER) + lightColor.a *= light.diffuseDimmer; + #endif + lightColor.rgb *= lightColor.a; + + lighting.direction = L; + lighting.color = lightColor.rgb; + } + return lighting; + } + + void lilGetPunctualLightColor(inout lilNPRLightingData dst, float3 positionWS, uint renderingLayers, uint featureFlags) + { + if(featureFlags & LIGHTFEATUREFLAGS_PUNCTUAL) + { + uint lightStart = 0; + bool fastPath = false; + #if SCALARIZE_LIGHT_LOOP + uint lightStartLane0; + fastPath = IsFastPath(lightStart, lightStartLane0); + if(fastPath) lightStart = lightStartLane0; + #endif + + uint lightListOffset = 0; + while(lightListOffset < _PunctualLightCount) + { + uint v_lightIdx = FetchIndex(lightStart, lightListOffset); + #if SCALARIZE_LIGHT_LOOP + uint s_lightIdx = ScalarizeElementIndex(v_lightIdx, fastPath); + #else + uint s_lightIdx = v_lightIdx; + #endif + if(s_lightIdx == -1) break; + + LightData lightData = FetchLight(s_lightIdx, 0); + + if(s_lightIdx >= v_lightIdx) + { + lightListOffset++; + if((lightData.lightLayers & renderingLayers) != 0) + { + lilNPRLightingData src = lilGetNPRPunctualLight(positionWS, lightData); + lilBlendlilNPRLightingData(dst, src); + } + } + } + } + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Area Light (Line / Rectangle) + lilNPRLightingData lilGetLineLightColor(float3 positionWS, LightData lightData) + { + lilNPRLightingData lighting = (lilNPRLightingData)0; + float3 unL = lightData.positionRWS - positionWS; + float intensity = EllipsoidalDistanceAttenuation( + unL, + lightData.right, + saturate(lightData.range / (lightData.range + 0.5 * lightData.size.x)), + lightData.rangeAttenuationScale, + lightData.rangeAttenuationBias); + #if !defined(LIL_HDRP_IGNORE_LIGHTDIMMER) + intensity *= lightData.diffuseDimmer; + #endif + lighting.color = lightData.color * intensity; + + float halfLength = 0.5 * lightData.size.x; + //float3 nearestPoint = lightData.positionRWS - lightData.right * clamp(dot(unL, lightData.right), -halfLength, halfLength); + float3 nearestPoint = lightData.positionRWS - lightData.right * clamp(dot(unL, lightData.right), -halfLength, halfLength) * 0.75; + lighting.direction = normalize(nearestPoint - positionWS); + + return lighting; + } + + lilNPRLightingData lilGetRectLightColor(float3 positionWS, LightData lightData) + { + lilNPRLightingData lighting = (lilNPRLightingData)0; + float3 lightColor = 0.0; + #if SHADEROPTIONS_BARN_DOOR + RectangularLightApplyBarnDoor(lightData, positionWS); + #endif + float3 unL = lightData.positionRWS - positionWS; + if(dot(lightData.forward, unL) < FLT_EPS) + { + float3x3 lightToWorld = float3x3(lightData.right, lightData.up, -lightData.forward); + float3 unL2 = mul(unL, transpose(lightToWorld)); + float halfWidth = lightData.size.x * 0.5; + float halfHeight = lightData.size.y * 0.5; + + float3 invHalfDim = rcp(float3(lightData.range + halfWidth, lightData.range + halfHeight, lightData.range)); + #ifdef ELLIPSOIDAL_ATTENUATION + float intensity = EllipsoidalDistanceAttenuation(unL2, invHalfDim, lightData.rangeAttenuationScale, lightData.rangeAttenuationBias); + #else + float intensity = BoxDistanceAttenuation(unL2, invHalfDim, lightData.rangeAttenuationScale, lightData.rangeAttenuationBias); + #endif + #if !defined(LIL_HDRP_IGNORE_LIGHTDIMMER) + intensity *= lightData.diffuseDimmer; + #endif + lighting.color = lightData.color * intensity; + + float2 halfLength = 0.5 * lightData.size.xy; + float3 nearestPoint = lightData.positionRWS + - lightData.right * clamp(dot(unL, lightData.right), -halfLength.x, halfLength.x) * 0.75 + - lightData.up * clamp(dot(unL, lightData.up), -halfLength.y, halfLength.y) * 0.75; + lighting.direction = normalize(nearestPoint - positionWS); + } + return lighting; + } + + void lilGetAreaLightColor(inout lilNPRLightingData dst, float3 positionWS, uint renderingLayers, uint featureFlags) + { + #if SHADEROPTIONS_AREA_LIGHTS + if(featureFlags & LIGHTFEATUREFLAGS_AREA) + { + if(_AreaLightCount > 0) + { + uint i = 0; + uint last = _AreaLightCount - 1; + LightData lightData = FetchLight(_PunctualLightCount, i); + + while(i <= last && lightData.lightType == GPULIGHTTYPE_TUBE) + { + lightData.lightType = GPULIGHTTYPE_TUBE; + #if defined(COOKIEMODE_NONE) + lightData.cookieMode = COOKIEMODE_NONE; + #endif + if((lightData.lightLayers & renderingLayers) != 0) + { + lilNPRLightingData lighting = lilGetLineLightColor(positionWS, lightData); + lilBlendlilNPRLightingData(dst, lighting); + } + lightData = FetchLight(_PunctualLightCount, min(++i, last)); + } + + while(i <= last) + { + lightData.lightType = GPULIGHTTYPE_RECTANGLE; + if((lightData.lightLayers & renderingLayers) != 0) + { + lilNPRLightingData lighting = lilGetRectLightColor(positionWS, lightData); + lilBlendlilNPRLightingData(dst, lighting); + } + lightData = FetchLight(_PunctualLightCount, min(++i, last)); + } + } + } + #endif + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Reflection / Refraction + float3 lilGetReflectionColor( + LightLoopContext lightLoopContext, PositionInputs posInput, float3 reflUVW, float perceptualRoughness, float3 normalDirection, + EnvLightData lightData, int influenceShapeType, inout float hierarchyWeight) + { + float weight = 1.0; + EvaluateLight_EnvIntersection(posInput.positionWS, normalDirection, lightData, influenceShapeType, reflUVW, weight); + float4 preLD = SampleEnv(lightLoopContext, posInput, lightData, reflUVW, PerceptualRoughnessToMipmapLevel(perceptualRoughness)); + weight *= preLD.a; + UpdateLightingHierarchyWeights(hierarchyWeight, weight); + return preLD.rgb * weight * lightData.multiplier; + } + + float3 lilGetReflectionSum(float3 viewDirection, float3 normalDirection, float perceptualRoughness, PositionInputs posInput, uint renderingLayers, uint featureFlags) + { + float3 reflUVW = reflect(-viewDirection, normalDirection); + LightLoopContext lightLoopContext = lilInitLightLoopContext(); + float3 specular = 0.0; + if(featureFlags & (LIGHTFEATUREFLAGS_ENV | LIGHTFEATUREFLAGS_SKY)) + { + float reflectionHierarchyWeight = 0.0; + uint envLightStart = 0; + + bool fastPath = false; + #if SCALARIZE_LIGHT_LOOP + uint envStartFirstLane; + fastPath = IsFastPath(envLightStart, envStartFirstLane); + #endif + + EnvLightData envLightData; + if(_EnvLightCount > 0) envLightData = FetchEnvLight(envLightStart, 0); + else envLightData = InitSkyEnvLightData(0); + + if(featureFlags & LIGHTFEATUREFLAGS_ENV) + { + lightLoopContext.sampleReflection = SINGLE_PASS_CONTEXT_SAMPLE_REFLECTION_PROBES; + + #if SCALARIZE_LIGHT_LOOP + if(fastPath) envLightStart = envStartFirstLane; + #endif + + uint v_envLightListOffset = 0; + uint v_envLightIdx = envLightStart; + while(v_envLightListOffset < _EnvLightCount) + { + v_envLightIdx = FetchIndex(envLightStart, v_envLightListOffset); + #if SCALARIZE_LIGHT_LOOP + uint s_envLightIdx = ScalarizeElementIndex(v_envLightIdx, fastPath); + #else + uint s_envLightIdx = v_envLightIdx; + #endif + if(s_envLightIdx == -1) break; + + EnvLightData s_envLightData = FetchEnvLight(s_envLightIdx, 0); + if(s_envLightIdx >= v_envLightIdx) + { + v_envLightListOffset++; + if((reflectionHierarchyWeight < 1.0) && ((s_envLightData.lightLayers & renderingLayers) != 0)) + { + specular += lilGetReflectionColor(lightLoopContext, posInput, reflUVW, perceptualRoughness, normalDirection, s_envLightData, s_envLightData.influenceShapeType, reflectionHierarchyWeight); + } + } + } + } + + if((featureFlags & LIGHTFEATUREFLAGS_SKY) && _EnvLightSkyEnabled) + { + lightLoopContext.sampleReflection = SINGLE_PASS_CONTEXT_SAMPLE_SKY; + EnvLightData envLightSky = InitSkyEnvLightData(0); + if(reflectionHierarchyWeight < 1.0) + { + specular += lilGetReflectionColor(lightLoopContext, posInput, reflUVW, perceptualRoughness, normalDirection, envLightSky, envLightSky.influenceShapeType, reflectionHierarchyWeight); + } + } + } + return specular * GetCurrentExposureMultiplier(); + } + + // Main light + #define LIL_MAINLIGHT_COLOR float3(1,1,1) + #define LIL_MAINLIGHT_DIRECTION float3(0,1,0) + + // Shadow + #define LIL_SHADOW_COORDS(idx) + #define LIL_TRANSFER_SHADOW(vi,uv,o) + #if defined(LIL_USE_SHADOW) + #define LIL_LIGHT_ATTENUATION(atten,i) atten = lilGetDirectionalShadow(posInput, i.normalWS, fd.featureFlags, _lilShadowCasterBias) + #else + #define LIL_LIGHT_ATTENUATION(atten,i) + #endif + + // Shadow caster + #define LIL_V2F_SHADOW_CASTER_OUTPUT + #define LIL_TRANSFER_SHADOW_CASTER(v,o) + #define LIL_SHADOW_CASTER_FRAGMENT(i) + + // Additional Light + void lilGetAdditionalLights(float3 positionWS, float4 positionCS, float strength, inout float3 lightColor, inout float3 lightDirection) + { + uint renderingLayers = lilGetRenderingLayer(); + uint featureFlags = LIGHT_FEATURE_MASK_FLAGS_OPAQUE; + + lilNPRLightingData lighting; + LIL_INITIALIZE_STRUCT(lilNPRLightingData, lighting); + lilGetPunctualLightColor(lighting, positionWS, renderingLayers, featureFlags); + lilGetAreaLightColor(lighting, positionWS, renderingLayers, featureFlags); + lightColor += lighting.color * 0.75 * GetCurrentExposureMultiplier() * strength; + lightDirection += lighting.direction * 0.75 * strength; + } + + float3 lilGetAdditionalLights(float3 positionWS, float4 positionCS, float strength) + { + float3 lightColor = 0.0; + float3 lightDirection = 0.0; + lilGetAdditionalLights(positionWS, positionCS, strength, lightColor, lightDirection); + return lightColor; + } + + // Lightmap + #define LIL_DECODE_LIGHTMAP(lm) DecodeLightmap(lm, float4(LIGHTMAP_HDR_MULTIPLIER,LIGHTMAP_HDR_EXPONENT,0.0,0.0)) + #define LIL_DECODE_DYNAMICLIGHTMAP(lm) lm.rgb + + // Environment reflection + #define LIL_GET_ENVIRONMENT_REFLECTION(viewDirection,normalDirection,perceptualRoughness,positionWS) \ + (_ReflectionCubeOverride ? \ + lilCustomReflection(_ReflectionCubeTex, _ReflectionCubeTex_HDR, viewDirection, normalDirection, perceptualRoughness) * _ReflectionCubeColor.rgb * lerp(1.0, fd.lightColor, _ReflectionCubeEnableLighting) : \ + lilGetReflectionSum(viewDirection,normalDirection,perceptualRoughness,posInput,fd.renderingLayers,fd.featureFlags)) + + // Fog + #define LIL_APPLY_FOG_BASE(col,fogCoord) col = EvaluateAtmosphericScattering(posInput, fd.V, col) + #define LIL_APPLY_FOG_COLOR_BASE(col,fogCoord,fogColor) col = EvaluateAtmosphericScattering(posInput, fd.V, col) + float lilCalcFogFactor(float depth) + { + return 0.0; + } +#else + // Support for old version + // HDRP Data + #if LIL_SRP_VERSION_GREATER_EQUAL(14, 0) + uint lilGetRenderingLayer() + { + return asuint(unity_RenderingLayer.x); + } + #elif LIL_SRP_VERSION_GREATER_EQUAL(12, 0) + uint lilGetRenderingLayer() + { + #if defined(_LIGHT_LAYERS) + return (asuint(unity_RenderingLayer.x) & RENDERING_LIGHT_LAYERS_MASK) >> RENDERING_LIGHT_LAYERS_MASK_SHIFT; + #else + return DEFAULT_LIGHT_LAYERS; + #endif + } + #else + uint lilGetRenderingLayer() + { + return 0; + } + #endif + #define LIL_GET_HDRPDATA(input,fd) + #define LIL_HDRP_DEEXPOSURE(col) + #define LIL_HDRP_INVDEEXPOSURE(col) + + #if LIL_SRP_VERSION_GREATER_EQUAL(12, 0) + #define LIL_MATRIX_PREV_VP _PrevViewProjMatrix + float3 lilSelectPreviousPosition(float3 previousPositionOS, float3 positionOS) + { + return unity_MotionVectorsParams.x > 0 ? previousPositionOS : positionOS; + } + + float3 lilTransformPreviousObjectToWorld(float3 previousPositionOS) + { + return mul(UNITY_PREV_MATRIX_M, float4(previousPositionOS,1)).xyz; + } + + float2 lilCalculateMotionVector(float4 positionCS, float4 previousPositionCS) + { + if(unity_MotionVectorsParams.y == 0) return float2(0.0, 0.0); + + #if LIL_SRP_VERSION_GREATER_EQUAL(16, 0) + positionCS.xy = positionCS.xy / positionCS.w; + #else + positionCS.xy = (positionCS.xy / LIL_SCREENPARAMS.xy - 0.5) * 2.0; + + #if UNITY_UV_STARTS_AT_TOP + positionCS.y = -positionCS.y; + #endif + #endif + + previousPositionCS.xy = previousPositionCS.xy / previousPositionCS.w; + + #if defined(_FOVEATED_RENDERING_NON_UNIFORM_RASTER) + float2 posUV = RemapFoveatedRenderingResolve(positionCS.xy * 0.5 + 0.5); + float2 prevPosUV = RemapFoveatedRenderingPrevFrameLinearToNonUniform(previousPositionCS.xy * 0.5 + 0.5); + float2 motionVec = posUV - prevPosUV; + #else + float2 motionVec = (positionCS.xy - previousPositionCS.xy) * 0.5; + #endif + + #if UNITY_UV_STARTS_AT_TOP + motionVec.y = -motionVec.y; + #endif + return motionVec; + } + + void lilApplyMotionVectorZBias(inout float4 positionCS) + { + #if defined(UNITY_REVERSED_Z) + positionCS.z -= unity_MotionVectorsParams.z * positionCS.w; + #else + positionCS.z += unity_MotionVectorsParams.z * positionCS.w; + #endif + } + #else + #define LIL_MATRIX_PREV_VP LIL_MATRIX_VP + float3 lilSelectPreviousPosition(float3 previousPositionOS, float3 positionOS) + { + return previousPositionOS; + } + + float3 lilTransformPreviousObjectToWorld(float3 previousPositionOS) + { + return 0; + } + + float2 lilCalculateMotionVector(float4 positionCS, float4 previousPositionCS) + { + return 0; + } + + void lilMotionVectorOffsetCS(inout float4 positionCS) + { + } + #endif + + // Main light + #if LIL_SRP_VERSION_GREATER_EQUAL(12, 0) && defined(_LIGHT_LAYERS) + #define LIL_MAINLIGHT_COLOR ((_MainLightLayerMask & lilGetRenderingLayer()) != 0 ? _MainLightColor.rgb : 0.0) + #else + #define LIL_MAINLIGHT_COLOR _MainLightColor.rgb + #endif + #define LIL_MAINLIGHT_DIRECTION _MainLightPosition.xyz + + // Shadow + float4 GetShadowCoord(float3 positionWS, float4 positionCS) + { + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + return GetShadowCoord(vertexInput); + } + + #if defined(LIL_USE_SHADOW) + #if defined(_MAIN_LIGHT_SHADOWS_SCREEN) + #define LIL_SHADOW_COORDS(idx) float4 shadowCoord : TEXCOORD##idx; + #define LIL_TRANSFER_SHADOW(vi,uv,o) o.shadowCoord = GetShadowCoord(vi.positionWS, vi.positionCS); + #define LIL_LIGHT_ATTENUATION(atten,i) atten = MainLightRealtimeShadow(i.shadowCoord) + #elif defined(_MAIN_LIGHT_SHADOWS_CASCADE) && !defined(_MAIN_LIGHT_SHADOWS) + #define LIL_SHADOW_COORDS(idx) + #define LIL_TRANSFER_SHADOW(vi,uv,o) + #define LIL_LIGHT_ATTENUATION(atten,i) atten = MainLightRealtimeShadow(TransformWorldToShadowCoord(i.positionWS)) + #else + #define LIL_SHADOW_COORDS(idx) float4 shadowCoord : TEXCOORD##idx; + #define LIL_TRANSFER_SHADOW(vi,uv,o) o.shadowCoord = GetShadowCoord(vi.positionWS, vi.positionCS); + #define LIL_LIGHT_ATTENUATION(atten,i) atten = MainLightRealtimeShadow(i.shadowCoord) + #endif + #else + #define LIL_SHADOW_COORDS(idx) + #define LIL_TRANSFER_SHADOW(vi,uv,o) + #define LIL_LIGHT_ATTENUATION(atten,i) + #endif + + // Shadow caster + float3 _LightDirection; + float3 _LightPosition; + #if LIL_SRP_VERSION_LOWER(5, 1) + float4 _ShadowBias; + #endif + float4 URPShadowPos(float4 positionOS, float3 normalOS, float bias) + { + float3 positionWS = TransformObjectToWorld(positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(normalOS); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDirectionWS = normalize(_LightPosition - positionWS); + #else + float3 lightDirectionWS = _LightDirection; + #endif + + positionWS -= lightDirectionWS * bias; + + #if LIL_SRP_VERSION_GREATER_EQUAL(5, 1) + float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS)); + #else + float biasN = _ShadowBias.y - saturate(dot(lightDirectionWS, normalWS)) * _ShadowBias.y; + float4 positionCS = TransformWorldToHClip(positionWS + lightDirectionWS * _ShadowBias.x + normalWS * biasN); + #endif + + #if UNITY_REVERSED_Z + positionCS.z = min(positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + positionCS.z = max(positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + + return positionCS; + } + #define LIL_V2F_SHADOW_CASTER_OUTPUT float4 positionCS : SV_POSITION; + #define LIL_TRANSFER_SHADOW_CASTER(v,o) o.positionCS = URPShadowPos(v.positionOS, v.normalOS, _lilShadowCasterBias) + #define LIL_SHADOW_CASTER_FRAGMENT(i) return 0 + + // Additional Light + void lilGetAdditionalLights(float3 positionWS, float4 positionCS, float strength, inout float3 lightColor, inout float3 lightDirection) + { + uint renderingLayers = lilGetRenderingLayer(); + float3 objPositionWS = lilGetObjectPosition(); + + #if defined(_ADDITIONAL_LIGHTS) || defined(_ADDITIONAL_LIGHTS_VERTEX) + uint lightsCount = GetAdditionalLightsCount(); + #if defined(LIGHT_LOOP_BEGIN) + InputData inputData = (InputData)0; + inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(positionCS); + inputData.positionWS = positionWS; + LIGHT_LOOP_BEGIN(lightsCount) + #else + for(uint lightIndex = 0; lightIndex < lightsCount; lightIndex++) + { + #endif + + Light light = GetAdditionalLight(lightIndex, positionWS); + #if LIL_SRP_VERSION_GREATER_EQUAL(12, 0) && defined(_LIGHT_LAYERS) + if((light.layerMask & renderingLayers) != 0) + #endif + { + lightColor += light.color.rgb * light.distanceAttenuation * strength; + lightDirection += dot(light.color.rgb, float3(1.0/3.0, 1.0/3.0, 1.0/3.0)) * light.distanceAttenuation * strength * light.direction; + } + + #if defined(LIGHT_LOOP_END) + LIGHT_LOOP_END + #else + } + #endif + #endif + + #if defined(_ADDITIONAL_LIGHTS) && (defined(USE_CLUSTERED_LIGHTING) && USE_CLUSTERED_LIGHTING || defined(USE_FORWARD_PLUS) && USE_FORWARD_PLUS) + #if defined(URP_FP_DIRECTIONAL_LIGHTS_COUNT) + for(uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++) + #else + for(uint lightIndex = 0; lightIndex < min(_AdditionalLightsDirectionalCount, MAX_VISIBLE_LIGHTS); lightIndex++) + #endif + { + Light light = GetAdditionalLight(lightIndex, positionWS); + #if LIL_SRP_VERSION_GREATER_EQUAL(12, 0) && defined(_LIGHT_LAYERS) + if((light.layerMask & renderingLayers) != 0) + #endif + lightColor += light.color.rgb * light.distanceAttenuation * strength; + lightDirection += dot(light.color.rgb, float3(1.0/3.0, 1.0/3.0, 1.0/3.0)) * light.distanceAttenuation * strength * light.direction; + } + #endif + } + + float3 lilGetAdditionalLights(float3 positionWS, float4 positionCS, float strength) + { + float3 lightColor = 0.0; + float3 lightDirection = 0.0; + lilGetAdditionalLights(positionWS, positionCS, strength, lightColor, lightDirection); + return lightColor; + } + + // Lightmap + #define LIL_DECODE_LIGHTMAP(lm) DecodeLightmap(lm, float4(LIGHTMAP_HDR_MULTIPLIER,LIGHTMAP_HDR_EXPONENT,0.0,0.0)) + #define LIL_DECODE_DYNAMICLIGHTMAP(lm) lm.rgb + + // Environment reflection + #define LIL_GET_ENVIRONMENT_REFLECTION(viewDirection,normalDirection,perceptualRoughness,positionWS) \ + ((IsEmpty(unity_SpecCube0) || unity_SpecCube0_HDR.x == 0 || _ReflectionCubeOverride) ? \ + lilCustomReflection(_ReflectionCubeTex, _ReflectionCubeTex_HDR, viewDirection, normalDirection, perceptualRoughness) * _ReflectionCubeColor.rgb * lerp(1.0, fd.lightColor, _ReflectionCubeEnableLighting) : \ + GlossyEnvironmentReflection(reflect(-viewDirection,normalDirection), perceptualRoughness, 1.0)) + + // Fog + #if LIL_RENDER == 2 + #define LIL_APPLY_FOG_BASE(col,fogCoord) col.rgb = lerp(unity_FogColor.rgb*col.a,col.rgb,fogCoord) + #define LIL_APPLY_FOG_COLOR_BASE(col,fogCoord,fogColor) col.rgb = lerp(fogColor.rgb*col.a,col.rgb,fogCoord) + #else + #define LIL_APPLY_FOG_BASE(col,fogCoord) col.rgb = lerp(unity_FogColor.rgb,col.rgb,fogCoord) + #define LIL_APPLY_FOG_COLOR_BASE(col,fogCoord,fogColor) col.rgb = lerp(fogColor.rgb,col.rgb,fogCoord) + #endif + #if LIL_SRP_VERSION_GREATER_EQUAL(7, 1) + float lilCalcFogFactor(float depth) + { + #if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2) + return ComputeFogIntensity(ComputeFogFactor(depth)); + #else + return 1.0; + #endif + } + #else + float lilCalcFogFactor(float depth) + { + #if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2) + float factor = ComputeFogFactor(depth); + #if defined(FOG_EXP) + return saturate(exp2(-factor)); + #elif defined(FOG_EXP2) + return saturate(exp2(-factor*factor)); + #elif defined(FOG_LINEAR) + return factor; + #else + return 0.0; + #endif + #else + return 1.0; + #endif + } + #endif +#endif + +// Meta +#if !defined(LIL_BRP) && (LIL_SRP_VERSION_LOWER(5, 14)) + #define LIL_TRANSFER_METAPASS(input,output) \ + output.positionCS = MetaVertexPosition(input.positionOS, input.uv1, input.uv2, unity_LightmapST) +#else + #define LIL_TRANSFER_METAPASS(input,output) \ + output.positionCS = MetaVertexPosition(input.positionOS, input.uv1, input.uv2, unity_LightmapST, unity_DynamicLightmapST) +#endif + +#if defined(LIL_HDRP) + #define LIL_IS_MIRROR false + #define LIL_LIGHTDIRECTION_ORIG lightDirection +#else + #define LIL_IS_MIRROR (dot(cross(LIL_MATRIX_V[0].xyz, LIL_MATRIX_V[1].xyz), LIL_MATRIX_V[2].xyz) > 0) + #define LIL_LIGHTDIRECTION_ORIG LIL_MAINLIGHT_DIRECTION +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Pi +#define LIL_PI 3.14159265359f +#define LIL_TWO_PI 6.28318530718f +#define LIL_FOUR_PI 12.56637061436f +#define LIL_INV_PI 0.31830988618f +#define LIL_INV_TWO_PI 0.15915494309f +#define LIL_INV_FOUR_PI 0.07957747155f +#define LIL_HALF_PI 1.57079632679f +#define LIL_INV_HALF_PI 0.636619772367f + +// Time +#define LIL_TIME _Time.y +#define LIL_INTER_TIME lilIntervalTime(_TimeInterval) + +// Interpolation for Tessellation +#define LIL_TRI_INTERPOLATION(i,o,bary,type) o.type = bary.x * i[0].type + bary.y * i[1].type + bary.z * i[2].type + +// Specular dielectric +#ifdef LIL_COLORSPACE_GAMMA + #define LIL_DIELECTRIC_SPECULAR float4(0.220916301, 0.220916301, 0.220916301, 1.0 - 0.220916301) +#else + #define LIL_DIELECTRIC_SPECULAR float4(0.04, 0.04, 0.04, 1.0 - 0.04) +#endif + +// Do not apply shadow +#if (defined(LIL_LITE) || defined(LIL_FUR) || defined(LIL_GEM)) && !defined(LIL_PASS_FORWARDADD) + #undef LIL_SHADOW_COORDS + #undef LIL_TRANSFER_SHADOW + #undef LIL_LIGHT_ATTENUATION + #define LIL_SHADOW_COORDS(idx) + #define LIL_TRANSFER_SHADOW(vi,uv,o) + #define LIL_LIGHT_ATTENUATION(atten,i) +#endif + +// Transform +#define LIL_VERTEX_POSITION_INPUTS(positionOS,o) lilVertexPositionInputs o = lilGetVertexPositionInputs(positionOS.xyz) +#define LIL_RE_VERTEX_POSITION_INPUTS(o) o = lilReGetVertexPositionInputs(o) +#define LIL_VERTEX_NORMAL_INPUTS(normalOS,o) lilVertexNormalInputs o = lilGetVertexNormalInputs(normalOS) +#define LIL_VERTEX_NORMAL_TANGENT_INPUTS(normalOS,tangentOS,o) lilVertexNormalInputs o = lilGetVertexNormalInputs(normalOS,tangentOS) + +// Lightmap +#if defined(LIL_USE_DOTS_INSTANCING) + #define LIL_SHADOWMAP_TEX unity_ShadowMasks + #define LIL_SHADOWMAP_SAMP samplerunity_ShadowMasks + #define LIL_LIGHTMAP_TEX unity_Lightmaps + #define LIL_LIGHTMAP_SAMP samplerunity_Lightmaps + #define LIL_LIGHTMAP_DIR_TEX unity_LightmapsInd + #define LIL_SAMPLE_LIGHTMAP(tex,samp,uv) LIL_SAMPLE_2D_ARRAY(tex,samp,uv,unity_LightmapIndex.x) +#else + #define LIL_SHADOWMAP_TEX unity_ShadowMask + #define LIL_SHADOWMAP_SAMP samplerunity_ShadowMask + #define LIL_LIGHTMAP_TEX unity_Lightmap + #define LIL_LIGHTMAP_SAMP samplerunity_Lightmap + #define LIL_LIGHTMAP_DIR_TEX unity_LightmapInd + #define LIL_SAMPLE_LIGHTMAP(tex,samp,uv) LIL_SAMPLE_2D(tex,samp,uv) +#endif + +#define LIL_DYNAMICLIGHTMAP_TEX unity_DynamicLightmap +#define LIL_DYNAMICLIGHTMAP_SAMP samplerunity_DynamicLightmap +#define LIL_DYNAMICLIGHTMAP_DIR_TEX unity_DynamicDirectionality + +float3 lilGetLightMapColor(float2 uv1, float2 uv2) +{ + float3 outCol = 0; + #if defined(LIL_USE_LIGHTMAP) + float2 lightmapUV = uv1 * unity_LightmapST.xy + unity_LightmapST.zw; + float4 lightmap = LIL_SAMPLE_LIGHTMAP(LIL_LIGHTMAP_TEX, LIL_LIGHTMAP_SAMP, lightmapUV); + outCol += LIL_DECODE_LIGHTMAP(lightmap); + #endif + #if defined(LIL_USE_DYNAMICLIGHTMAP) + float2 dynlightmapUV = uv2 * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + float4 dynlightmap = LIL_SAMPLE_2D(LIL_DYNAMICLIGHTMAP_TEX, LIL_DYNAMICLIGHTMAP_SAMP, dynlightmapUV); + outCol += LIL_DECODE_DYNAMICLIGHTMAP(dynlightmap); + #endif + return outCol; +} + +float3 lilGetLightMapDirection(float2 uv) +{ + float3 lightmapDir = 0.0; + #if defined(LIL_USE_LIGHTMAP) && defined(LIL_USE_DIRLIGHTMAP) + float4 lightmapDirection = LIL_SAMPLE_LIGHTMAP(LIL_DIRLIGHTMAP_TEX, LIL_LIGHTMAP_SAMP, uv); + lightmapDir = lightmapDirection.xyz * 2.0 - 1.0; + #endif + #if defined(LIL_USE_DYNAMICLIGHTMAP) && defined(LIL_USE_DIRLIGHTMAP) + float4 lightmapDirection = LIL_SAMPLE_LIGHTMAP(LIL_DYNAMICLIGHTMAP_DIR_TEX, LIL_DYNAMICLIGHTMAP_SAMP, uv); + lightmapDir = lightmapDirection.xyz * 2.0 - 1.0; + #endif + return lightmapDir; +} + +// Main Light Coords +#if defined(LIL_PASS_FORWARDADD) + #define LIL_LIGHTCOLOR_COORDS(idx) + #define LIL_LIGHTDIRECTION_COORDS(idx) +#else + #define LIL_LIGHTCOLOR_COORDS(idx) float3 lightColor : TEXCOORD##idx; + #define LIL_LIGHTDIRECTION_COORDS(idx) float3 lightDirection : TEXCOORD##idx; +#endif + +#if !defined(LIL_PASS_FORWARDADD) && (defined(LIL_FEATURE_SHADOW) || defined(LIL_LITE)) + #define LIL_INDLIGHTCOLOR_COORDS(idx) float3 indLightColor : TEXCOORD##idx; + #define LIL_GET_INDLIGHTCOLOR(i,o) o.indLightColor = i.indLightColor +#else + #define LIL_INDLIGHTCOLOR_COORDS(idx) + #define LIL_GET_INDLIGHTCOLOR(i,o) +#endif + +// Dir light & indir light +#if defined(LIL_USE_LPPV) && (defined(LIL_FEATURE_SHADOW) || defined(LIL_LITE)) + #define LIL_CALC_TWOLIGHT(i,o) lilGetLightColorDouble(i.positionWS, o.lightColor, o.indLightColor) +#elif defined(LIL_FEATURE_SHADOW) || defined(LIL_LITE) + #define LIL_CALC_TWOLIGHT(i,o) lilGetLightColorDouble(o.lightColor, o.indLightColor) +#elif defined(LIL_USE_LPPV) + #define LIL_CALC_TWOLIGHT(i,o) o.lightColor = lilGetLightColor(i.positionWS) +#else + #define LIL_CALC_TWOLIGHT(i,o) o.lightColor = lilGetLightColor() +#endif + +// Main Light in VS (Color / Direction) +struct lilLightData +{ + float3 lightDirection; + float3 lightColor; + float3 indLightColor; +}; + + +// Main Light in VS +#if defined(LIL_USE_ADDITIONALLIGHT_MAIN) + #define LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o) \ + float3 additionalLightDirection = 0.0; \ + lilGetAdditionalLights(i.positionWS, i.positionCS/float4(i.positionCS.www,1.0)*float4(LIL_SCREENPARAMS.xy,1.0,1.0), LIL_ADDITIONAL_LIGHT_STRENGTH, o.lightColor, additionalLightDirection) + #define LIL_CORRECT_LIGHTDIRECTION_PS(lightDirection) lightDirection = normalize(lightDirection) +#elif defined(LIL_USE_ADDITIONALLIGHT_MAINDIR) + #define LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o) \ + lilGetAdditionalLights(i.positionWS, i.positionCS/float4(i.positionCS.www,1.0)*float4(LIL_SCREENPARAMS.xy,1.0,1.0), LIL_ADDITIONAL_LIGHT_STRENGTH, o.lightColor, o.lightDirection) + #define LIL_CORRECT_LIGHTDIRECTION_PS(lightDirection) lightDirection = normalize(lightDirection) +#elif defined(LIL_USE_ADDITIONALLIGHT_MAINDIR_PS) + #define LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o) + #define LIL_CORRECT_LIGHTDIRECTION_PS(lightDirection) lightDirection = normalize(lightDirection) +#elif defined(LIL_URP) + #define LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o) o.lightDirection = normalize(o.lightDirection) + #define LIL_CORRECT_LIGHTDIRECTION_PS(lightDirection) +#else + #define LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o) + #define LIL_CORRECT_LIGHTDIRECTION_PS(lightDirection) +#endif + +#if defined(LIL_USE_LIGHTMAP) || defined(LIL_USE_ADDITIONALLIGHT_MAINDIR_PS) + #define LIL_CORRECT_LIGHTCOLOR_VS(lightColor) + #define LIL_CORRECT_LIGHTCOLOR_PS(lightColor) \ + lightColor = clamp(lightColor, _LightMinLimit, _LightMaxLimit); \ + lightColor = lerp(lightColor, lilGray(lightColor), _MonochromeLighting); \ + lightColor = lerp(lightColor, 1.0, _AsUnlit) +#else + #define LIL_CORRECT_LIGHTCOLOR_VS(lightColor) \ + lightColor = clamp(lightColor, _LightMinLimit, _LightMaxLimit); \ + lightColor = lerp(lightColor, lilGray(lightColor), _MonochromeLighting); \ + lightColor = lerp(lightColor, 1.0, _AsUnlit) + #define LIL_CORRECT_LIGHTCOLOR_PS(lightColor) +#endif + +#if defined(LIL_FEATURE_LTCGI) + #define LIL_APPLY_LTCGI(o) lilLTCGI(o, vertexInput.positionWS, normalize(vertexNormalInput.normalWS), normalize(lilHeadDirection(lilToAbsolutePositionWS(vertexInput.positionWS))), input.uv1); +#else + #define LIL_APPLY_LTCGI(o) +#endif + +#if defined(LIL_PASS_FORWARDADD) + #define LIL_CALC_MAINLIGHT(i,o) +#elif defined(LIL_HDRP) + #define LIL_CALC_MAINLIGHT(i,o) \ + lilLightData o; \ + lilGetLightDirectionAndColor(o.lightDirection, o.lightColor, posInput); \ + o.lightColor *= _lilDirectionalLightStrength; \ + float3 lightDirectionCopy = o.lightDirection; \ + o.lightDirection = o.lightDirection * Luminance(o.lightColor) + unity_SHAr.xyz * 0.333333 + unity_SHAg.xyz * 0.333333 + unity_SHAb.xyz * 0.333333; \ + float3 lightDirectionSH = dot(o.lightDirection,o.lightDirection) < 0.000001 ? 0 : normalize(o.lightDirection); \ + o.lightDirection += lilGetCustomLightDirection(_LightDirectionOverride); \ + o.lightColor += lilShadeSH9(float4(lightDirectionSH * 0.666666, 1.0)); \ + o.indLightColor = lilShadeSH9(float4(-lightDirectionSH * 0.666666, 1.0)); \ + o.indLightColor = saturate(o.indLightColor / Luminance(o.lightColor)); \ + o.lightColor = min(o.lightColor, _BeforeExposureLimit); \ + o.lightColor *= GetCurrentExposureMultiplier(); \ + LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o); \ + LIL_CORRECT_LIGHTCOLOR_VS(o.lightColor) +#elif defined(LIL_BRP) + #define LIL_CALC_MAINLIGHT(i,o) \ + OpenLitLightDatas lightDatas; \ + ComputeLights(lightDatas, _LightDirectionOverride); \ + lilLightData o; \ + o.lightDirection = lightDatas.lightDirection; \ + o.lightColor = lightDatas.directLight; \ + o.indLightColor = lightDatas.indirectLight; \ + LIL_APPLY_LTCGI(o) \ + LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o); \ + LIL_CORRECT_LIGHTCOLOR_VS(o.lightColor) +#else + #define LIL_CALC_MAINLIGHT(i,o) \ + lilLightData o; \ + o.lightDirection = normalize(LIL_MAINLIGHT_DIRECTION * lilLuminance(LIL_MAINLIGHT_COLOR) + unity_SHAr.xyz * 0.333333 + unity_SHAg.xyz * 0.333333 + unity_SHAb.xyz * 0.333333); \ + LIL_CALC_TWOLIGHT(i,o); \ + o.lightDirection = lilGetFixedLightDirection(_LightDirectionOverride, false); \ + LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o); \ + LIL_CORRECT_LIGHTCOLOR_VS(o.lightColor) +#endif + +// Main Light in PS (Color / Direction / Attenuation) +#if defined(LIL_PASS_FORWARDADD) + // Point Light & Spot Light (ForwardAdd) + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + ld = lilGetLightDirection(input.positionWS); \ + lc = min(LIL_MAINLIGHT_COLOR * atten, _LightMaxLimit); \ + lc = lerp(lc, lilGray(lc), _MonochromeLighting); \ + lc = lerp(lc, 0.0, _AsUnlit) +#elif defined(LIL_HDRP) && defined(LIL_USE_LIGHTMAP) + // HDRP with lightmap + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + lc += lightmapColor * GetCurrentExposureMultiplier(); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#elif defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SHADOWMASK) + // Mixed Lightmap (Shadowmask) + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + lc = max(lc, lightmapColor); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld); \ + atten = min(atten, LIL_SAMPLE_LIGHTMAP(LIL_SHADOWMAP_TEX,LIL_LIGHTMAP_SAMP,fd.uv1).r) +#elif defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SUBTRACTIVE) && defined(LIL_USE_DYNAMICLIGHTMAP) + // Mixed Lightmap (Subtractive) + // Use Lightmap as Shadowmask + #undef LIL_USE_DYNAMICLIGHTMAP + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + lc = max(lc, lightmapColor); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld); \ + float3 lightmapShadowThreshold = LIL_MAINLIGHT_COLOR*0.5; \ + float3 lightmapS = (lightmapColor - lightmapShadowThreshold) / (LIL_MAINLIGHT_COLOR - lightmapShadowThreshold); \ + float lightmapAttenuation = saturate((lightmapS.r+lightmapS.g+lightmapS.b)/3.0); \ + atten = min(atten, lightmapAttenuation) +#elif defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SUBTRACTIVE) + // Mixed Lightmap (Subtractive) + // Use Lightmap as Shadowmask + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + lc = max(lc, lightmapColor); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld); \ + float3 lightmapS = (lightmapColor - lilShadeSH9(input.normalWS)) / LIL_MAINLIGHT_COLOR; \ + float lightmapAttenuation = saturate((lightmapS.r+lightmapS.g+lightmapS.b)/3.0); \ + atten = min(atten, lightmapAttenuation) +#elif defined(LIL_USE_LIGHTMAP) && defined(LIL_USE_DIRLIGHTMAP) + // Lightmap (Directional) + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + float3 lightmapDirection = lilGetLightMapDirection(input.uv1); \ + lc = saturate(lc + lightmapColor); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + ld = normalize(ld + lightmapDirection * lilLuminance(lightmapColor)); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#elif defined(LIL_USE_LIGHTMAP) && defined(LIL_USE_SHADOW) + // Mixed Lightmap (Baked Indirect) with shadow + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = LIL_MAINLIGHT_COLOR; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + lc = saturate(lc + max(lightmapColor,lilGetSHToon())); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#elif defined(LIL_USE_LIGHTMAP) && defined(LIL_USE_DYNAMICLIGHTMAP) + // Mixed Lightmap (Baked Indirect) or Lightmap (Non-Directional) + #undef LIL_USE_DYNAMICLIGHTMAP + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + lc = saturate(lc + lightmapColor); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#elif defined(LIL_USE_LIGHTMAP) + // Mixed Lightmap (Baked Indirect) or Lightmap (Non-Directional) + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = LIL_MAINLIGHT_COLOR; \ + float3 lightmapColor = lilGetLightMapColor(fd.uv1,fd.uv2); \ + lc = saturate(lc + lightmapColor); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#elif defined(LIL_USE_ADDITIONALLIGHT_MAINDIR_PS) + // Realtime + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + lilGetAdditionalLights(input.positionWS, input.positionCS, LIL_ADDITIONAL_LIGHT_STRENGTH, lc, ld); \ + LIL_CORRECT_LIGHTCOLOR_PS(lc); \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#elif defined(LIL_USE_ADDITIONALLIGHT_MAINDIR) + // Realtime + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#else + // Realtime + #define LIL_GET_MAINLIGHT(input,lc,ld,atten) \ + lc = input.lightColor; \ + LIL_CORRECT_LIGHTDIRECTION_PS(ld) +#endif + +// Additional Light VS and Fog +#if defined(LIL_USE_ADDITIONALLIGHT_VS) + #define LIL_VERTEXLIGHT_FOG_TYPE float4 + #define LIL_VERTEXLIGHT_FOG_COORDS(idx) float4 vlf : TEXCOORD##idx; + #define LIL_TRANSFER_FOG(i,o) o.vlf.w = lilCalcFogFactor(i.positionCS.z) + #define LIL_APPLY_FOG(col,i) LIL_APPLY_FOG_BASE(col,i.vlf.w) + #define LIL_APPLY_FOG_COLOR(col,i,fogColor) LIL_APPLY_FOG_COLOR_BASE(col,i.vlf.w,fogColor) +#elif defined(LIL_HDRP) + #define LIL_VERTEXLIGHT_FOG_TYPE + #define LIL_VERTEXLIGHT_FOG_COORDS(idx) + #define LIL_TRANSFER_FOG(i,o) + #define LIL_APPLY_FOG(col,i) LIL_APPLY_FOG_BASE(col,i.vlf) + #define LIL_APPLY_FOG_COLOR(col,i,fogColor) LIL_APPLY_FOG_COLOR_BASE(col,i.vlf,fogColor) +#else + #define LIL_VERTEXLIGHT_FOG_TYPE float + #define LIL_VERTEXLIGHT_FOG_COORDS(idx) float vlf : TEXCOORD##idx; + #define LIL_TRANSFER_FOG(i,o) o.vlf = lilCalcFogFactor(i.positionCS.z) + #define LIL_APPLY_FOG(col,i) LIL_APPLY_FOG_BASE(col,i.vlf) + #define LIL_APPLY_FOG_COLOR(col,i,fogColor) LIL_APPLY_FOG_COLOR_BASE(col,i.vlf,fogColor) +#endif + +#if defined(LIL_USE_ADDITIONALLIGHT_VS) && (defined(VERTEXLIGHT_ON) || !defined(LIL_BRP)) + #define LIL_CALC_VERTEXLIGHT(i,o) \ + o.vlf.rgb = lilGetAdditionalLights(i.positionWS, i.positionCS/float4(i.positionCS.www,1.0)*float4(LIL_SCREENPARAMS.xy,1.0,1.0), LIL_ADDITIONAL_LIGHT_STRENGTH); \ + o.vlf.rgb = lerp(o.vlf.rgb, lilGray(o.vlf.rgb), _MonochromeLighting); \ + o.vlf.rgb = lerp(o.vlf.rgb, 0.0, _AsUnlit) +#elif defined(LIL_USE_ADDITIONALLIGHT_VS) + #define LIL_CALC_VERTEXLIGHT(i,o) +#elif defined(LIL_USE_ADDITIONALLIGHT_MAIN) + #define LIL_CALC_VERTEXLIGHT(i,o) +#else + #define LIL_CALC_VERTEXLIGHT(i,o) +#endif + +// Additional Light PS +#if defined(LIL_USE_ADDITIONALLIGHT_PS) + #define LIL_GET_ADDITIONALLIGHT(i,o) \ + o = lilGetAdditionalLights(i.positionWS, i.positionCS, LIL_ADDITIONAL_LIGHT_STRENGTH); \ + o = lerp(o, lilGray(o), _MonochromeLighting); \ + o = lerp(o, 0.0, _AsUnlit) +#elif defined(LIL_USE_ADDITIONALLIGHT_VS) + #define LIL_GET_ADDITIONALLIGHT(i,o) \ + o = i.vlf.rgb +#elif defined(LIL_USE_ADDITIONALLIGHT_MAIN) + #define LIL_GET_ADDITIONALLIGHT(i,o) \ + o = 0 +#else + #define LIL_GET_ADDITIONALLIGHT(i,o) \ + o = 0 +#endif + +// Fragment Macro +#if defined(LIL_HDRP) + #define LIL_GET_LIGHTING_DATA(input,fd) \ + LIL_GET_MAINLIGHT(input, fd.lightColor, fd.L, fd.attenuation); \ + fd.origL = fd.L; \ + LIL_GET_ADDITIONALLIGHT(input, fd.addLightColor); \ + fd.invLighting = saturate((1.0 - fd.lightColor) * sqrt(fd.lightColor)) +#else + #define LIL_GET_LIGHTING_DATA(input,fd) \ + LIL_GET_MAINLIGHT(input, fd.lightColor, fd.L, fd.attenuation); \ + LIL_GET_ADDITIONALLIGHT(input, fd.addLightColor); \ + fd.invLighting = saturate((1.0 - fd.lightColor) * sqrt(fd.lightColor)) +#endif + +#define LIL_GET_POSITION_WS_DATA(input,fd) \ + fd.depth = length(lilHeadDirection(fd.positionWS)); \ + fd.depthObject = length(lilHeadDirection(lilTransformOStoWS(float3(0,0,0)))); \ + fd.V = normalize(lilViewDirection(fd.positionWS)); \ + fd.headV = normalize(lilHeadDirection(fd.positionWS)); \ + fd.vl = dot(fd.V, fd.L); \ + fd.hl = dot(fd.headV, fd.L); \ + fd.uvPanorama = lilGetPanoramaUV(fd.V) + +#define LIL_GET_TBN_DATA(input,fd) \ + float3 bitangentWS = cross(input.normalWS, input.tangentWS.xyz) * (input.tangentWS.w * LIL_NEGATIVE_SCALE); \ + fd.TBN = float3x3(input.tangentWS.xyz, bitangentWS, input.normalWS) + +#define LIL_GET_PARALLAX_DATA(input,fd) \ + fd.parallaxViewDirection = mul(fd.TBN, fd.V); \ + fd.parallaxOffset = (fd.parallaxViewDirection.xy / (fd.parallaxViewDirection.z+0.5)) + +// Main Color & Emission +#if defined(LIL_BAKER) + #define LIL_GET_SUBTEX(tex,uv) lilGetSubTexWithoutAnimation(tex, tex##_ST, tex##_ScrollRotate, tex##Angle, uv, 1, tex##IsDecal, tex##IsLeftOnly, tex##IsRightOnly, tex##ShouldCopy, tex##ShouldFlipMirror, tex##ShouldFlipCopy, tex##IsMSDF, isRightHand LIL_SAMP_IN(sampler##tex)) + #define LIL_GET_EMITEX(tex,uv) LIL_SAMPLE_2D(tex, sampler##tex, lilCalcUVWithoutAnimation(uv, tex##_ST, tex##_ScrollRotate)) + #define LIL_GET_EMIMASK(tex,uv) LIL_SAMPLE_2D(tex, sampler_MainTex, lilCalcUVWithoutAnimation(uv, tex##_ST, tex##_ScrollRotate)) +#elif defined(LIL_WITHOUT_ANIMATION) + #define LIL_GET_SUBTEX(tex,uv) lilGetSubTexWithoutAnimation(tex, tex##_ST, tex##_ScrollRotate, tex##Angle, uv, 1, tex##IsDecal, tex##IsLeftOnly, tex##IsRightOnly, tex##ShouldCopy, tex##ShouldFlipMirror, tex##ShouldFlipCopy, tex##IsMSDF, fd.isRightHand LIL_SAMP_IN(sampler##tex)) + #define LIL_GET_EMITEX(tex,uv) LIL_SAMPLE_2D(tex, sampler##tex, lilCalcUVWithoutAnimation(uv, tex##_ST, tex##_ScrollRotate)) + #define LIL_GET_EMIMASK(tex,uv) LIL_SAMPLE_2D(tex, sampler_MainTex, lilCalcUVWithoutAnimation(uv, tex##_ST, tex##_ScrollRotate)) +#else + #define LIL_GET_SUBTEX(tex,uv) lilGetSubTex(tex, tex##_ST, tex##_ScrollRotate, tex##Angle, uv, fd.nv, tex##IsDecal, tex##IsLeftOnly, tex##IsRightOnly, tex##ShouldCopy, tex##ShouldFlipMirror, tex##ShouldFlipCopy, tex##IsMSDF, fd.isRightHand, tex##DecalAnimation, tex##DecalSubParam LIL_SAMP_IN(sampler##tex)) + #define LIL_GET_EMITEX(tex,uv) LIL_SAMPLE_2D(tex, sampler##tex, lilCalcUV(uv, tex##_ST, tex##_ScrollRotate)) + #define LIL_GET_EMIMASK(tex,uv) LIL_SAMPLE_2D(tex, sampler_MainTex, lilCalcUV(uv, tex##_ST, tex##_ScrollRotate)) +#endif + +// Fallback +#define UnpackNormalScale(normal,scale) lilUnpackNormalScale(normal,scale) + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl.meta new file mode 100644 index 00000000..47736414 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_macro.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7621b8fcab43e25419d64ba197c6c041 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl new file mode 100644 index 00000000..172a1342 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl @@ -0,0 +1,516 @@ +#ifndef LIL_VERTEX_INCLUDED +#define LIL_VERTEX_INCLUDED + +#if defined(LIL_V2F_OUT_BASE) + #undef LIL_V2F_OUT_BASE +#endif +#if defined(LIL_V2F_OUT) + #undef LIL_V2F_OUT +#endif +#if defined(LIL_V2F_TYPE) + #undef LIL_V2F_TYPE +#endif + +#if defined(LIL_ONEPASS_OUTLINE) + #define LIL_V2F_OUT_BASE output.base + #define LIL_V2F_OUT output + #define LIL_V2F_TYPE v2g +#else + #define LIL_V2F_OUT_BASE output + #define LIL_V2F_OUT output + #define LIL_V2F_TYPE v2f +#endif + +#if !defined(LIL_CUSTOM_VERT_COPY) + #define LIL_CUSTOM_VERT_COPY +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Insert a process for a custom shader +void lilCustomVertexOS(inout appdata input, inout float2 uvMain, inout float4 positionOS) +{ + #if defined(LIL_CUSTOM_VERTEX_OS) + LIL_CUSTOM_VERTEX_OS + #endif +} + +void lilCustomVertexOS(inout appdata input, inout float2 uvMain, inout float3 positionOS) +{ + float4 positionOS4 = float4(positionOS, 1.0); + lilCustomVertexOS(input, uvMain, positionOS4); + positionOS = positionOS4.xyz; +} + +void lilCustomVertexWS(inout appdata input, inout float2 uvMain, inout lilVertexPositionInputs vertexInput, inout lilVertexNormalInputs vertexNormalInput) +{ + #if defined(LIL_CUSTOM_VERTEX_WS) + LIL_CUSTOM_VERTEX_WS + #endif +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Vertex shader +LIL_V2F_TYPE vert(appdata input) +{ + bool dissolveActive = true; + bool dissolveInvert = false; + + LIL_V2F_TYPE LIL_V2F_OUT; + LIL_INITIALIZE_STRUCT(v2f, LIL_V2F_OUT_BASE); + #if defined(LIL_ONEPASS_OUTLINE) + LIL_V2F_OUT.positionCSOL = 0.0; + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + LIL_V2F_OUT.previousPositionCSOL = 0.0; + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Invisible + #if defined(LIL_OUTLINE) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER) && defined(USING_STEREO_MATRICES) + #define LIL_VERTEX_CONDITION (_Invisible || _OutlineDisableInVR) + #elif defined(LIL_OUTLINE) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER) + #define LIL_VERTEX_CONDITION (_Invisible || _OutlineDisableInVR && (abs(LIL_MATRIX_P._m02) > 0.000001)) + #else + #define LIL_VERTEX_CONDITION (_Invisible) + #endif + + #if !defined(SHADER_STAGE_VERTEX) || defined(LIL_CUSTOM_SAFEVERT) + if(!LIL_VERTEX_CONDITION) + { + #else + if(LIL_VERTEX_CONDITION) return LIL_V2F_OUT; + #endif + + #undef LIL_VERTEX_CONDITION + + //------------------------------------------------------------------------------------------------------------------------------ + // Single Pass Instanced rendering + LIL_SETUP_INSTANCE_ID(input); + LIL_TRANSFER_INSTANCE_ID(input, LIL_V2F_OUT_BASE); + LIL_INITIALIZE_VERTEX_OUTPUT_STEREO(LIL_V2F_OUT_BASE); + + //------------------------------------------------------------------------------------------------------------------------------ + // UV + float2 uvMain = lilCalcUV(input.uv0, _MainTex_ST); + float2 uvs[4] = {uvMain,input.uv1,input.uv2,input.uv3}; + + //------------------------------------------------------------------------------------------------------------------------------ + // Object space direction + #if defined(LIL_APP_NORMAL) && defined(LIL_APP_TANGENT) + float3 bitangentOS = normalize(cross(input.normalOS, input.tangentOS.xyz)) * (input.tangentOS.w * length(input.normalOS)); + float3x3 tbnOS = float3x3(input.tangentOS.xyz, bitangentOS, input.normalOS); + #else + float3 bitangentOS = 0.0; + float3x3 tbnOS = 0.0; + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Vertex Modification + #include "lil_vert_encryption.hlsl" + lilCustomVertexOS(input, uvMain, input.positionOS); + #include "lil_vert_audiolink.hlsl" + #if !defined(LIL_ONEPASS_OUTLINE) + #include "lil_vert_outline.hlsl" + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Previous Position (for HDRP) + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + input.previousPositionOS = lilSelectPreviousPosition(input.previousPositionOS, input.positionOS.xyz); + #if defined(_ADD_PRECOMPUTED_VELOCITY) + input.previousPositionOS -= input.precomputedVelocity; + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Vertex Modification + #define LIL_MODIFY_PREVPOS + #include "lil_vert_encryption.hlsl" + lilCustomVertexOS(input, uvMain, input.previousPositionOS); + #include "lil_vert_audiolink.hlsl" + #undef LIL_MODIFY_PREVPOS + + //------------------------------------------------------------------------------------------------------------------------------ + // Transform + LIL_VERTEX_POSITION_INPUTS(input.previousPositionOS, previousVertexInput); + #if defined(LIL_APP_NORMAL) && defined(LIL_APP_TANGENT) + LIL_VERTEX_NORMAL_TANGENT_INPUTS(input.normalOS, input.tangentOS, previousVertexNormalInput); + #elif defined(LIL_APP_NORMAL) + LIL_VERTEX_NORMAL_INPUTS(input.normalOS, previousVertexNormalInput); + #else + lilVertexNormalInputs previousVertexNormalInput = lilGetVertexNormalInputs(); + #endif + previousVertexInput.positionWS = lilTransformPreviousObjectToWorld(input.previousPositionOS.xyz); + lilCustomVertexWS(input, uvMain, previousVertexInput, previousVertexNormalInput); + LIL_V2F_OUT_BASE.previousPositionCS = mul(LIL_MATRIX_PREV_VP, float4(previousVertexInput.positionWS, 1.0)); + + #if defined(LIL_ONEPASS_OUTLINE) + #define LIL_MODIFY_PREVPOS + #include "lil_vert_outline.hlsl" + #undef LIL_MODIFY_PREVPOS + LIL_VERTEX_POSITION_INPUTS(input.previousPositionOS, previousOLVertexInput); + previousOLVertexInput.positionWS = lilTransformPreviousObjectToWorld(input.previousPositionOS.xyz); + lilCustomVertexWS(input, uvMain, previousOLVertexInput, previousVertexNormalInput); + LIL_V2F_OUT.previousPositionCSOL = mul(LIL_MATRIX_PREV_VP, float4(previousOLVertexInput.positionWS, 1.0)); + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Transform + #if defined(LIL_APP_POSITION) + LIL_VERTEX_POSITION_INPUTS(input.positionOS, vertexInput); + #endif + #if defined(LIL_APP_NORMAL) && defined(LIL_APP_TANGENT) + LIL_VERTEX_NORMAL_TANGENT_INPUTS(input.normalOS, input.tangentOS, vertexNormalInput); + #elif defined(LIL_APP_NORMAL) + LIL_VERTEX_NORMAL_INPUTS(input.normalOS, vertexNormalInput); + #else + lilVertexNormalInputs vertexNormalInput = lilGetVertexNormalInputs(); + #endif + lilCustomVertexWS(input, uvMain, vertexInput, vertexNormalInput); + #if defined(LIL_CUSTOM_VERTEX_WS) + LIL_RE_VERTEX_POSITION_INPUTS(vertexInput); + #endif + float3 viewDirection = normalize(lilViewDirection(lilToAbsolutePositionWS(vertexInput.positionWS))); + float3 headDirection = normalize(lilHeadDirection(lilToAbsolutePositionWS(vertexInput.positionWS))); + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + + // UV + #if defined(LIL_V2F_TEXCOORD0) + LIL_V2F_OUT_BASE.uv0 = input.uv0; + #endif + #if defined(LIL_V2F_TEXCOORD1) + LIL_V2F_OUT_BASE.uv1 = input.uv1; + #endif + #if defined(LIL_V2F_TEXCOORD2) + LIL_V2F_OUT_BASE.uv2 = input.uv2; + #endif + #if defined(LIL_V2F_TEXCOORD3) + LIL_V2F_OUT_BASE.uv3 = input.uv3; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD01) + LIL_V2F_OUT_BASE.uv01.xy = input.uv0; + LIL_V2F_OUT_BASE.uv01.zw = input.uv1; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD23) + LIL_V2F_OUT_BASE.uv23.xy = input.uv2; + LIL_V2F_OUT_BASE.uv23.zw = input.uv3; + #endif + #if defined(LIL_V2F_UVMAT) + LIL_V2F_OUT_BASE.uvMat = lilCalcMatCapUV(input.uv1, vertexNormalInput.normalWS, viewDirection, headDirection, _MatCapTex_ST, _MatCapBlendUV1.xy, _MatCapZRotCancel, _MatCapPerspective, _MatCapVRParallaxStrength); + #endif + + // Position + #if defined(LIL_V2F_POSITION_CS) + LIL_V2F_OUT_BASE.positionCS = vertexInput.positionCS; + #endif + #if defined(LIL_V2F_POSITION_OS) + LIL_V2F_OUT_BASE.positionOSdissolve.xyz = input.positionOS.xyz; + #endif + #if defined(LIL_V2F_POSITION_WS) + LIL_V2F_OUT_BASE.positionWS = vertexInput.positionWS; + #endif + #if defined(LIL_V2F_POSITION_CS_NO_JITTER) + LIL_V2F_OUT_BASE.positionCSNoJitter = mul(_NonJitteredViewProjMatrix, float4(vertexInput.positionWS.xyz, 1)); + #if defined(LIL_V2F_POSITION_CS) + lilApplyMotionVectorZBias(LIL_V2F_OUT_BASE.positionCS); + #endif + #endif + + // Normal + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_NORMALIZE_NORMAL_IN_VS) && !defined(SHADER_QUALITY_LOW) + LIL_V2F_OUT_BASE.normalWS = normalize(vertexNormalInput.normalWS); + #elif defined(LIL_V2F_NORMAL_WS) + LIL_V2F_OUT_BASE.normalWS = vertexNormalInput.normalWS; + #endif + #if defined(LIL_V2F_TANGENT_WS) + LIL_V2F_OUT_BASE.tangentWS = float4(vertexNormalInput.tangentWS, input.tangentOS.w); + #endif + + LIL_CUSTOM_VERT_COPY + + //------------------------------------------------------------------------------------------------------------------------------ + // Meta + #if defined(LIL_PASS_META_INCLUDED) && !defined(LIL_HDRP) + LIL_TRANSFER_METAPASS(input,LIL_V2F_OUT_BASE); + #if defined(EDITOR_VISUALIZATION) + if (unity_VisualizationMode == EDITORVIZ_TEXTURE) + LIL_V2F_OUT_BASE.vizUV = UnityMetaVizUV(unity_EditorViz_UVIndex, input.uv0, input.uv1, input.uv2, unity_EditorViz_Texture_ST); + else if (unity_VisualizationMode == EDITORVIZ_SHOWLIGHTMASK) + { + LIL_V2F_OUT_BASE.vizUV = input.uv1 * unity_LightmapST.xy + unity_LightmapST.zw; + LIL_V2F_OUT_BASE.lightCoord = mul(unity_EditorViz_WorldToLight, float4(lilTransformOStoWS(input.positionOS.xyz), 1.0)); + } + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Fog & Lighting + lilFragData fd = lilInitFragData(); + LIL_GET_HDRPDATA(vertexInput,fd); + #if defined(LIL_V2F_LIGHTCOLOR) || defined(LIL_V2F_LIGHTDIRECTION) || defined(LIL_V2F_INDLIGHTCOLOR) || defined(LIL_V2F_NDOTL) + LIL_CALC_MAINLIGHT(vertexInput, lightdataInput); + #endif + #if defined(LIL_V2F_LIGHTCOLOR) + LIL_V2F_OUT_BASE.lightColor = lightdataInput.lightColor; + #endif + #if defined(LIL_V2F_LIGHTDIRECTION) + LIL_V2F_OUT_BASE.lightDirection = lightdataInput.lightDirection; + #endif + #if defined(LIL_V2F_INDLIGHTCOLOR) + LIL_V2F_OUT_BASE.indLightColor = lightdataInput.indLightColor * _ShadowEnvStrength; + #endif + #if defined(LIL_V2F_NDOTL) + float2 outlineNormalVS = normalize(lilTransformDirWStoVSCenter(vertexNormalInput.normalWS).xy); + #if defined(LIL_PASS_FORWARDADD) + float2 outlineLightVS = normalize(lilTransformDirWStoVSCenter(normalize(_WorldSpaceLightPos0.xyz - vertexInput.positionWS * _WorldSpaceLightPos0.w)).xy); + #else + float2 outlineLightVS = normalize(lilTransformDirWStoVSCenter(lightdataInput.lightDirection).xy); + #endif + LIL_V2F_OUT_BASE.NdotL = dot(outlineNormalVS, outlineLightVS) * 0.5 + 0.5; + #endif + #if defined(LIL_V2F_SHADOW) + LIL_TRANSFER_SHADOW(vertexInput, input.uv1, LIL_V2F_OUT_BASE); + #endif + #if defined(LIL_V2F_VERTEXLIGHT_FOG) + LIL_TRANSFER_FOG(vertexInput, LIL_V2F_OUT_BASE); + LIL_CALC_VERTEXLIGHT(vertexInput, LIL_V2F_OUT_BASE); + #endif + #if defined(LIL_V2F_SHADOW_CASTER) + LIL_TRANSFER_SHADOW_CASTER(input, LIL_V2F_OUT_BASE); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Clipping Canceller + #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) + #if defined(UNITY_REVERSED_Z) + // DirectX + if(LIL_V2F_OUT_BASE.positionCS.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT_BASE.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + LIL_V2F_OUT_BASE.positionCS.z = LIL_V2F_OUT_BASE.positionCS.z * 0.0001 + LIL_V2F_OUT_BASE.positionCS.w * 0.999; + } + #else + // OpenGL + if(LIL_V2F_OUT_BASE.positionCS.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT_BASE.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + LIL_V2F_OUT_BASE.positionCS.z = LIL_V2F_OUT_BASE.positionCS.z * 0.0001 - LIL_V2F_OUT_BASE.positionCS.w * 0.999; + } + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // One Pass Outline (for HDRP) + #if defined(LIL_ONEPASS_OUTLINE) + #include "lil_vert_outline.hlsl" + vertexInput = lilGetVertexPositionInputs(input.positionOS); + lilCustomVertexWS(input, uvMain, vertexInput, vertexNormalInput); + #if defined(LIL_CUSTOM_VERTEX_WS) + LIL_RE_VERTEX_POSITION_INPUTS(vertexInput); + #endif + LIL_V2F_OUT.positionCSOL = vertexInput.positionCS; + + //------------------------------------------------------------------------------------------------------------------------------ + // Clipping Canceller + #if defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) + #if defined(UNITY_REVERSED_Z) + // DirectX + if(LIL_V2F_OUT.positionCSOL.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT.positionCSOL.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + LIL_V2F_OUT.positionCSOL.z = LIL_V2F_OUT.positionCSOL.z * 0.0001 + LIL_V2F_OUT.positionCSOL.w * 0.999; + } + #else + // OpenGL + if(LIL_V2F_OUT.positionCSOL.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT.positionCSOL.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + LIL_V2F_OUT.positionCSOL.z = LIL_V2F_OUT.positionCSOL.z * 0.0001 - LIL_V2F_OUT.positionCSOL.w * 0.999; + } + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Offset z for Less ZTest + #if defined(UNITY_REVERSED_Z) + // DirectX + LIL_V2F_OUT.positionCSOL.z -= 0.0001; + #else + // OpenGL + LIL_V2F_OUT.positionCSOL.z += 0.0001; + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Offset z for Less ZTest + #if defined(SHADERPASS) && SHADERPASS == SHADERPASS_DEPTH_ONLY && defined(LIL_OUTLINE) + #if defined(UNITY_REVERSED_Z) + // DirectX + LIL_V2F_OUT_BASE.positionCS.z -= 0.0001; + #else + // OpenGL + LIL_V2F_OUT_BASE.positionCS.z += 0.0001; + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Remove Outline + #if defined(LIL_ONEPASS_OUTLINE) && defined(LIL_PASS_FORWARD_INCLUDED) + float width = lilGetOutlineWidth(uvMain, input.color, _OutlineWidth, _OutlineWidthMask, _OutlineVertexR2Width LIL_SAMP_IN(lil_sampler_linear_repeat)); + if(width > -0.000001 && width < 0.000001 && _OutlineDeleteMesh) LIL_V2F_OUT.positionCSOL = 0.0/0.0; + #elif defined(LIL_OUTLINE) && defined(LIL_PASS_FORWARD_INCLUDED) + float width = lilGetOutlineWidth(uvMain, input.color, _OutlineWidth, _OutlineWidthMask, _OutlineVertexR2Width LIL_SAMP_IN(lil_sampler_linear_repeat)); + if(width > -0.000001 && width < 0.000001 && _OutlineDeleteMesh) LIL_V2F_OUT_BASE.positionCS = 0.0/0.0; + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // IDMask + #if defined(LIL_FEATURE_IDMASK) && !defined(LIL_NOT_SUPPORT_VERTEXID) && !defined(LIL_LITE) + int idMaskIndices[8] = {_IDMaskIndex1,_IDMaskIndex2,_IDMaskIndex3,_IDMaskIndex4,_IDMaskIndex5,_IDMaskIndex6,_IDMaskIndex7,_IDMaskIndex8}; + float idMaskFlags[8] = {_IDMask1,_IDMask2,_IDMask3,_IDMask4,_IDMask5,_IDMask6,_IDMask7,_IDMask8}; + float idMaskPriorFlags[8] = {_IDMaskPrior1,_IDMaskPrior2,_IDMaskPrior3,_IDMaskPrior4,_IDMaskPrior5,_IDMaskPrior6,_IDMaskPrior7,_IDMaskPrior8}; + uint idMaskArg = 0; + switch(_IDMaskFrom) + { + #if defined(LIL_APP_TEXCOORD0) + case 0: idMaskArg = input.uv0.x; break; + #endif + #if defined(LIL_APP_TEXCOORD1) + case 1: idMaskArg = input.uv1.x; break; + #endif + #if defined(LIL_APP_TEXCOORD2) + case 2: idMaskArg = input.uv2.x; break; + #endif + #if defined(LIL_APP_TEXCOORD3) + case 3: idMaskArg = input.uv3.x; break; + #endif + #if defined(LIL_APP_TEXCOORD4) + case 4: idMaskArg = input.uv4.x; break; + #endif + #if defined(LIL_APP_TEXCOORD5) + case 5: idMaskArg = input.uv5.x; break; + #endif + #if defined(LIL_APP_TEXCOORD6) + case 6: idMaskArg = input.uv6.x; break; + #endif + #if defined(LIL_APP_TEXCOORD7) + case 7: idMaskArg = input.uv7.x; break; + #endif + default: idMaskArg = input.vertexID; break; + } + bool idMasked = IDMask(idMaskArg,_IDMaskIsBitmap,idMaskIndices,idMaskFlags); + if(_IDMaskControlsDissolve) + { + bool priorIdMasked = IDMask(idMaskArg, _IDMaskIsBitmap, idMaskIndices, idMaskPriorFlags); + dissolveActive = idMasked != priorIdMasked; + dissolveInvert = priorIdMasked; + idMasked = idMasked && priorIdMasked; + } + #if defined(LIL_V2F_POSITION_CS) + LIL_V2F_OUT_BASE.positionCS = idMasked ? 0.0/0.0 : LIL_V2F_OUT_BASE.positionCS; + #endif + #if defined(LIL_ONEPASS_OUTLINE) + LIL_V2F_OUT.positionCSOL = idMasked ? 0.0/0.0 : LIL_V2F_OUT.positionCSOL; + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // UDIM Discard + #if defined(LIL_FEATURE_UDIMDISCARD) && !defined(LIL_LITE) + if(_UDIMDiscardMode == 0 && _UDIMDiscardCompile == 1 && LIL_CHECK_UDIMDISCARD(input)) // Discard Vertices instead of just pixels + { + #if defined(LIL_V2F_POSITION_CS) || defined(LIL_V2F_SHADOW_CASTER_OUTPUT) + LIL_V2F_OUT_BASE.positionCS = 0.0/0.0; + #endif + #if defined(LIL_ONEPASS_OUTLINE) + LIL_V2F_OUT.positionCSOL = 0.0/0.0; + #endif + } + #endif + + #if defined(LIL_V2F_POSITION_OS) + LIL_V2F_OUT_BASE.positionOSdissolve.w = (dissolveActive | (dissolveInvert << 1)); + #endif + + #if !defined(SHADER_STAGE_VERTEX) || defined(LIL_CUSTOM_SAFEVERT) + } + #endif + + return LIL_V2F_OUT; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Geometry shader (for HDRP) +#if defined(LIL_ONEPASS_OUTLINE) + [maxvertexcount(12)] + void geom(triangle v2g input[3], inout TriangleStream outStream) + { + //------------------------------------------------------------------------------------------------------------------------------ + // Invisible + if(_Invisible) return; + + v2f output[3]; + LIL_INITIALIZE_STRUCT(v2f, output[0]); + LIL_INITIALIZE_STRUCT(v2f, output[1]); + LIL_INITIALIZE_STRUCT(v2f, output[2]); + + LIL_SETUP_INSTANCE_ID(input[0].base); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input[0].base); + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + for(uint i = 0; i < 3; i++) + { + output[i] = input[i].base; + } + + // Front + if(_Cull != 1) + { + outStream.Append(output[0]); + outStream.Append(output[1]); + outStream.Append(output[2]); + outStream.RestartStrip(); + } + + // Back + if(_Cull != 2) + { + outStream.Append(output[2]); + outStream.Append(output[1]); + outStream.Append(output[0]); + outStream.RestartStrip(); + } + + //------------------------------------------------------------------------------------------------------------------------------ + // Outline + for(uint j = 0; j < 3; j++) + { + output[j].positionCS = input[j].positionCSOL; + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + output[j].previousPositionCS = input[j].previousPositionCSOL; + #endif + } + + // Front + if(_OutlineCull != 1) + { + outStream.Append(output[0]); + outStream.Append(output[1]); + outStream.Append(output[2]); + outStream.RestartStrip(); + } + + // Back + if(_OutlineCull != 2) + { + outStream.Append(output[2]); + outStream.Append(output[1]); + outStream.Append(output[0]); + outStream.RestartStrip(); + } + } +#endif + +#undef LIL_V2F_OUT_BASE +#undef LIL_V2F_OUT + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl.meta new file mode 100644 index 00000000..16899425 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_vert.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 134d8aa747e57894dbf11aea028c3ed6 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl new file mode 100644 index 00000000..35a652fc --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl @@ -0,0 +1,510 @@ +#ifndef LIL_VERTEX_FUR_INCLUDED +#define LIL_VERTEX_FUR_INCLUDED + +#if !defined(LIL_CUSTOM_VERT_COPY) + #define LIL_CUSTOM_VERT_COPY +#endif + +void lilCustomVertexOS(inout appdata input, inout float2 uvMain, inout float4 positionOS) +{ + #if defined(LIL_CUSTOM_VERTEX_OS) + LIL_CUSTOM_VERTEX_OS + #endif +} + +void lilCustomVertexOS(inout appdata input, inout float2 uvMain, inout float3 positionOS) +{ + float4 positionOS4 = float4(positionOS, 1.0); + lilCustomVertexOS(input, uvMain, positionOS4); + positionOS = positionOS4.xyz; +} + +void lilCustomVertexWS(inout appdata input, inout float2 uvMain, inout lilVertexPositionInputs vertexInput, inout lilVertexNormalInputs vertexNormalInput) +{ + #if defined(LIL_CUSTOM_VERTEX_WS) + LIL_CUSTOM_VERTEX_WS + #endif +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Vertex shader +v2g vert(appdata input) +{ + v2g output; + LIL_INITIALIZE_STRUCT(v2g, output); + + //------------------------------------------------------------------------------------------------------------------------------ + // Invisible + if(_Invisible) return output; + + //------------------------------------------------------------------------------------------------------------------------------ + // Single Pass Instanced rendering + LIL_SETUP_INSTANCE_ID(input); + LIL_TRANSFER_INSTANCE_ID(input, output); + LIL_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + //------------------------------------------------------------------------------------------------------------------------------ + // UV + float2 uvMain = lilCalcUV(input.uv0, _MainTex_ST); + float2 uvs[4] = {uvMain,input.uv1,input.uv2,input.uv3}; + + //------------------------------------------------------------------------------------------------------------------------------ + // Vertex Modification + #include "lil_vert_encryption.hlsl" + lilCustomVertexOS(input, uvMain, input.positionOS); + + //------------------------------------------------------------------------------------------------------------------------------ + // Previous Position (for HDRP) + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + input.previousPositionOS = lilSelectPreviousPosition(input.previousPositionOS, input.positionOS.xyz); + #if defined(_ADD_PRECOMPUTED_VELOCITY) + input.previousPositionOS -= input.precomputedVelocity; + #endif + #define LIL_MODIFY_PREVPOS + #include "lil_vert_encryption.hlsl" + lilCustomVertexOS(input, uvMain, input.previousPositionOS); + #undef LIL_MODIFY_PREVPOS + + //------------------------------------------------------------------------------------------------------------------------------ + // Transform + LIL_VERTEX_POSITION_INPUTS(input.previousPositionOS, previousVertexInput); + #if defined(LIL_APP_NORMAL) && defined(LIL_APP_TANGENT) + LIL_VERTEX_NORMAL_TANGENT_INPUTS(input.normalOS, input.tangentOS, previousVertexNormalInput); + #elif defined(LIL_APP_NORMAL) + LIL_VERTEX_NORMAL_INPUTS(input.normalOS, previousVertexNormalInput); + #else + lilVertexNormalInputs previousVertexNormalInput = lilGetVertexNormalInputs(); + #endif + previousVertexInput.positionWS = lilTransformPreviousObjectToWorld(input.previousPositionOS); + lilCustomVertexWS(input, uvMain, previousVertexInput, previousVertexNormalInput); + output.previousPositionWS = previousVertexInput.positionWS; + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Transform + LIL_VERTEX_POSITION_INPUTS(input.positionOS, vertexInput); + LIL_VERTEX_NORMAL_INPUTS(input.normalOS, vertexNormalInput); + lilCustomVertexWS(input, uvMain, vertexInput, vertexNormalInput); + #if defined(LIL_CUSTOM_VERTEX_WS) + LIL_RE_VERTEX_POSITION_INPUTS(vertexInput); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + #if defined(LIL_V2G_POSITION_WS) + output.positionWS = vertexInput.positionWS; + #endif + #if defined(LIL_V2G_TEXCOORD0) + output.uv0 = input.uv0; + #endif + #if defined(LIL_V2G_TEXCOORD1) + output.uv1 = input.uv1; + #endif + #if defined(LIL_V2G_TEXCOORD2) + output.uv2 = input.uv2; + #endif + #if defined(LIL_V2G_TEXCOORD3) + output.uv3 = input.uv3; + #endif + #if defined(LIL_V2G_PACKED_TEXCOORD01) + output.uv01.xy = input.uv0; + output.uv01.zw = input.uv1; + #endif + #if defined(LIL_V2G_PACKED_TEXCOORD23) + output.uv23.xy = input.uv2; + output.uv23.zw = input.uv3; + #endif + #if !defined(LIL_NOT_SUPPORT_VERTEXID) && defined(LIL_V2G_VERTEXID) + output.vertexID = input.vertexID; + #endif + #if defined(LIL_V2G_NORMAL_WS) + output.normalWS = vertexNormalInput.normalWS; + #endif + + LIL_CUSTOM_VERT_COPY + + //------------------------------------------------------------------------------------------------------------------------------ + // UDIM Discard + #if defined(LIL_FEATURE_UDIMDISCARD) && !defined(LIL_LITE) + if(_UDIMDiscardMode == 0 && _UDIMDiscardCompile == 1 && LIL_CHECK_UDIMDISCARD(input)) // Discard Vertices instead of just pixels + { + #if defined(LIL_V2F_POSITION_CS) + output.positionWS = 0.0/0.0; + #endif + return output; + } + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Fog & Lighting + lilFragData fd = lilInitFragData(); + LIL_GET_HDRPDATA(vertexInput,fd); + #if defined(LIL_V2F_LIGHTCOLOR) || defined(LIL_V2F_LIGHTDIRECTION) || defined(LIL_V2F_INDLIGHTCOLOR) + LIL_CALC_MAINLIGHT(vertexInput, lightdataInput); + #endif + #if defined(LIL_V2F_LIGHTCOLOR) + output.lightColor = lightdataInput.lightColor; + #endif + #if defined(LIL_V2F_LIGHTDIRECTION) + output.lightDirection = lightdataInput.lightDirection; + #endif + #if defined(LIL_V2F_INDLIGHTCOLOR) + output.indLightColor = lightdataInput.indLightColor * _ShadowEnvStrength; + #endif + #if defined(LIL_V2G_SHADOW) + LIL_TRANSFER_SHADOW(vertexInput, input.uv1, output); + #endif + #if defined(LIL_V2G_VERTEXLIGHT_FOG) + LIL_TRANSFER_FOG(vertexInput, output); + LIL_CALC_VERTEXLIGHT(vertexInput, output); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Vector + #if defined(LIL_V2G_FURVECTOR) + float3 bitangentOS = normalize(cross(input.normalOS, input.tangentOS.xyz)) * (input.tangentOS.w * length(input.normalOS)); + float3x3 tbnOS = float3x3(input.tangentOS.xyz, bitangentOS, input.normalOS); + output.furVector = _FurVector.xyz + float3(0,0,0.001); + if(_VertexColor2FurVector) output.furVector = lilBlendNormal(output.furVector, input.color.xyz); + #if defined(LIL_FEATURE_FurVectorTex) + output.furVector = lilBlendNormal(output.furVector, lilUnpackNormalScale(LIL_SAMPLE_2D_LOD(_FurVectorTex, lil_sampler_linear_repeat, uvMain, 0), _FurVectorScale)); + #endif + output.furVector = mul(normalize(output.furVector), tbnOS); + output.furVector *= _FurVector.w; + #if defined(LIL_FUR_PRE) + output.furVector *= _FurCutoutLength; + #endif + output.furVector = lilTransformDirOStoWS(output.furVector, false); + float furLength = length(output.furVector); + output.furVector.y -= _FurGravity * furLength; + + #if defined(LIL_FEATURE_FUR_COLLISION) && defined(LIL_BRP) && defined(VERTEXLIGHT_ON) + // Touch + float3 positionWS2 = output.positionWS + output.furVector; + float4 toLightX = unity_4LightPosX0 - positionWS2.x; + float4 toLightY = unity_4LightPosY0 - positionWS2.y; + float4 toLightZ = unity_4LightPosZ0 - positionWS2.z; + float4 lengthSq = toLightX * toLightX + 0.000001; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + float4 atten = saturate(1.0 - lengthSq * unity_4LightAtten0 / 25.0) * _FurTouchStrength * furLength; + //float4 rangeToggle = abs(frac(sqrt(25.0 / unity_4LightAtten0) * 100.0) - 0.22); + float4 rangeToggle = abs(frac(sqrt(250000 / unity_4LightAtten0)) - 0.22); + output.furVector = rangeToggle[0] < 0.001 - unity_LightColor[0].r - unity_LightColor[0].g - unity_LightColor[0].b ? output.furVector - float3(toLightX[0], toLightY[0], toLightZ[0]) * rsqrt(lengthSq[0]) * atten[0] : output.furVector; + output.furVector = rangeToggle[1] < 0.001 - unity_LightColor[1].r - unity_LightColor[1].g - unity_LightColor[1].b ? output.furVector - float3(toLightX[1], toLightY[1], toLightZ[1]) * rsqrt(lengthSq[1]) * atten[1] : output.furVector; + output.furVector = rangeToggle[2] < 0.001 - unity_LightColor[2].r - unity_LightColor[2].g - unity_LightColor[2].b ? output.furVector - float3(toLightX[2], toLightY[2], toLightZ[2]) * rsqrt(lengthSq[2]) * atten[2] : output.furVector; + output.furVector = rangeToggle[3] < 0.001 - unity_LightColor[3].r - unity_LightColor[3].g - unity_LightColor[3].b ? output.furVector - float3(toLightX[3], toLightY[3], toLightZ[3]) * rsqrt(lengthSq[3]) * atten[3] : output.furVector; + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // IDMask + #if defined(LIL_FEATURE_IDMASK) && !defined(LIL_NOT_SUPPORT_VERTEXID) + int idMaskIndices[8] = {_IDMaskIndex1,_IDMaskIndex2,_IDMaskIndex3,_IDMaskIndex4,_IDMaskIndex5,_IDMaskIndex6,_IDMaskIndex7,_IDMaskIndex8}; + float idMaskFlags[8] = {_IDMask1,_IDMask2,_IDMask3,_IDMask4,_IDMask5,_IDMask6,_IDMask7,_IDMask8}; + uint idMaskArg = 0; + switch(_IDMaskFrom) + { + #if defined(LIL_APP_TEXCOORD0) + case 0: idMaskArg = input.uv0.x; break; + #endif + #if defined(LIL_APP_TEXCOORD1) + case 1: idMaskArg = input.uv1.x; break; + #endif + #if defined(LIL_APP_TEXCOORD2) + case 2: idMaskArg = input.uv2.x; break; + #endif + #if defined(LIL_APP_TEXCOORD3) + case 3: idMaskArg = input.uv3.x; break; + #endif + #if defined(LIL_APP_TEXCOORD4) + case 4: idMaskArg = input.uv4.x; break; + #endif + #if defined(LIL_APP_TEXCOORD5) + case 5: idMaskArg = input.uv5.x; break; + #endif + #if defined(LIL_APP_TEXCOORD6) + case 6: idMaskArg = input.uv6.x; break; + #endif + #if defined(LIL_APP_TEXCOORD7) + case 7: idMaskArg = input.uv7.x; break; + #endif + default: idMaskArg = input.vertexID; break; + } + bool idMasked = IDMask(idMaskArg,_IDMaskIsBitmap,idMaskIndices,idMaskFlags); + #if defined(LIL_V2G_POSITION_WS) + output.positionWS = idMasked ? 0.0/0.0 : output.positionWS; + #endif + #endif + + return output; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Fin +float lilLerp3(float a, float b, float c, float3 factor) { return a * factor.x + b * factor.y + c * factor.z; } +float2 lilLerp3(float2 a, float2 b, float2 c, float3 factor) { return a * factor.x + b * factor.y + c * factor.z; } +float3 lilLerp3(float3 a, float3 b, float3 c, float3 factor) { return a * factor.x + b * factor.y + c * factor.z; } +float4 lilLerp3(float4 a, float4 b, float4 c, float3 factor) { return a * factor.x + b * factor.y + c * factor.z; } +float lilLerp3(float a[3], float3 factor) { return lilLerp3(a[0], a[1], a[2], factor); } +float2 lilLerp3(float2 a[3], float3 factor) { return lilLerp3(a[0], a[1], a[2], factor); } +float3 lilLerp3(float3 a[3], float3 factor) { return lilLerp3(a[0], a[1], a[2], factor); } +float4 lilLerp3(float4 a[3], float3 factor) { return lilLerp3(a[0], a[1], a[2], factor); } + +void AppendFur(inout TriangleStream outStream, inout v2f output, v2g input[3], float3 furVectors[3], float3 factor) +{ + #if defined(LIL_V2F_TEXCOORD0) + output.uv0 = lilLerp3(input[0].uv0, input[1].uv0, input[2].uv0, factor); + #endif + #if defined(LIL_V2F_TEXCOORD1) + output.uv1 = lilLerp3(input[0].uv1, input[1].uv1, input[2].uv1, factor); + #endif + #if defined(LIL_V2F_TEXCOORD2) + output.uv2 = lilLerp3(input[0].uv2, input[1].uv2, input[2].uv2, factor); + #endif + #if defined(LIL_V2F_TEXCOORD3) + output.uv3 = lilLerp3(input[0].uv3, input[1].uv3, input[2].uv3, factor); + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD01) + output.uv01 = lilLerp3(input[0].uv01, input[1].uv01, input[2].uv01, factor); + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD23) + output.uv23 = lilLerp3(input[0].uv23, input[1].uv23, input[2].uv23, factor); + #endif + #if defined(LIL_V2F_NORMAL_WS) + output.normalWS = lilLerp3(input[0].normalWS, input[1].normalWS, input[2].normalWS, factor); + #endif + #if defined(LIL_V2F_LIGHTCOLOR) && defined(LIL_FEATURE_LTCGI) && defined(LIL_PASS_FORWARD) + output.lightColor = lilLerp3(input[0].lightColor, input[1].lightColor, input[2].lightColor, factor); + #endif + #if defined(LIL_V2F_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP)) + output.vlf = lilLerp3(input[0].vlf, input[1].vlf, input[2].vlf, factor); + #endif + + float3 positionWS = lilLerp3(input[0].positionWS, input[1].positionWS, input[2].positionWS, factor); + #if defined(LIL_V2F_POSITION_WS) + output.positionWS = positionWS; + #endif + #if defined(LIL_V2F_POSITION_CS) + output.positionCS = lilTransformWStoCS(positionWS); + #endif + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + float3 previousPositionWS = lilLerp3(input[0].previousPositionWS, input[1].previousPositionWS, input[2].previousPositionWS, factor); + output.previousPositionCS = mul(LIL_MATRIX_PREV_VP, float4(previousPositionWS, 1.0)); + #endif + #if defined(LIL_V2F_FURLAYER) + output.furLayer = 0; + #endif + #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) + //------------------------------------------------------------------------------------------------------------------------------ + // Clipping Canceller + #if defined(UNITY_REVERSED_Z) + // DirectX + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; + } + #else + // OpenGL + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; + } + #endif + #endif + #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FUR_PRE) + #if defined(UNITY_REVERSED_Z) + // DirectX + output.positionCS.z -= 0.0000001; + #else + // OpenGL + output.positionCS.z += 0.0000001; + #endif + #endif + + outStream.Append(output); + + float3 mixVector = lilLerp3(furVectors[0], furVectors[1], furVectors[2], factor); + positionWS.xyz += mixVector; + #if defined(LIL_V2F_POSITION_WS) + output.positionWS = positionWS; + #endif + #if defined(LIL_V2F_POSITION_CS) + output.positionCS = lilTransformWStoCS(positionWS); + #endif + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + previousPositionWS.xyz += mixVector; + output.previousPositionCS = mul(LIL_MATRIX_PREV_VP, float4(previousPositionWS, 1.0)); + #endif + #if defined(LIL_V2F_FURLAYER) + output.furLayer = 1; + #endif + #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) + //------------------------------------------------------------------------------------------------------------------------------ + // Clipping Canceller + #if defined(UNITY_REVERSED_Z) + // DirectX + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; + } + #else + // OpenGL + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; + } + #endif + #endif + #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FUR_PRE) + #if defined(UNITY_REVERSED_Z) + // DirectX + output.positionCS.z -= 0.000001; + #else + // OpenGL + output.positionCS.z += 0.000001; + #endif + #endif + outStream.Append(output); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Geometry shader +#if defined(LIL_ONEPASS_FUR) + [maxvertexcount(46)] +#elif (defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)) && (defined(LIL_USE_LIGHTMAP) || defined(LIL_USE_DYNAMICLIGHTMAP) || defined(LIL_LIGHTMODE_SHADOWMASK)) || defined(LIL_FEATURE_DISTANCE_FADE) || !defined(LIL_BRP) + [maxvertexcount(32)] +#else + [maxvertexcount(40)] +#endif +void geom(triangle v2g input[3], inout TriangleStream outStream) +{ + //------------------------------------------------------------------------------------------------------------------------------ + // Invisible + if(_Invisible) return; + + LIL_SETUP_INSTANCE_ID(input[0]); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input[0]); + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + #if defined(LIL_ONEPASS_FUR) + v2f outputBase[3]; + LIL_INITIALIZE_STRUCT(v2f, outputBase[0]); + LIL_INITIALIZE_STRUCT(v2f, outputBase[1]); + LIL_INITIALIZE_STRUCT(v2f, outputBase[2]); + + for(uint i = 0; i < 3; i++) + { + LIL_TRANSFER_INSTANCE_ID(input[i], outputBase[i]); + LIL_TRANSFER_VERTEX_OUTPUT_STEREO(input[i], outputBase[i]); + #if defined(LIL_V2F_POSITION_CS) + outputBase[i].positionCS = lilTransformWStoCS(input[i].positionWS); + #endif + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + outputBase[i].previousPositionCS = mul(LIL_MATRIX_PREV_VP, float4(input[i].previousPositionWS, 1.0)); + #endif + #if defined(LIL_V2F_TEXCOORD0) + outputBase[i].uv0 = input[i].uv0; + #endif + #if defined(LIL_V2F_NORMAL_WS) + outputBase[i].normalWS = input[i].normalWS; + #endif + #if defined(LIL_V2F_FURLAYER) + outputBase[i].furLayer = -2; + #endif + } + + // Front + if(_Cull != 1) + { + outStream.Append(outputBase[0]); + outStream.Append(outputBase[1]); + outStream.Append(outputBase[2]); + outStream.RestartStrip(); + } + + // Back + if(_Cull != 2) + { + outStream.Append(outputBase[2]); + outStream.Append(outputBase[1]); + outStream.Append(outputBase[0]); + outStream.RestartStrip(); + } + #endif + + v2f output; + LIL_INITIALIZE_STRUCT(v2f, output); + LIL_TRANSFER_INSTANCE_ID(input[0], output); + LIL_TRANSFER_VERTEX_OUTPUT_STEREO(input[0], output); + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Light + #if defined(LIL_V2G_LIGHTCOLOR) + output.lightColor = input[0].lightColor; + #endif + #if defined(LIL_V2G_LIGHTDIRECTION) + output.lightDirection = input[0].lightDirection; + #endif + #if defined(LIL_V2G_INDLIGHTCOLOR) + output.indLightColor = input[0].indLightColor; + #endif + + if(_FurMeshType) + { + #include "lil_common_vert_fur_thirdparty.hlsl" + } + else + { + float3 furVectors[3]; + furVectors[0] = input[0].furVector; + furVectors[1] = input[1].furVector; + furVectors[2] = input[2].furVector; + #if !defined(LIL_NOT_SUPPORT_VERTEXID) + uint3 n0 = (input[0].vertexID * 3 + input[1].vertexID * 1 + input[2].vertexID * 1) * uint3(1597334677U, 3812015801U, 2912667907U); + uint3 n1 = (input[0].vertexID * 1 + input[1].vertexID * 3 + input[2].vertexID * 1) * uint3(1597334677U, 3812015801U, 2912667907U); + uint3 n2 = (input[0].vertexID * 1 + input[1].vertexID * 1 + input[2].vertexID * 3) * uint3(1597334677U, 3812015801U, 2912667907U); + float3 noise0 = normalize(float3(n0) * (2.0/float(0xffffffffU)) - 1.0); + float3 noise1 = normalize(float3(n1) * (2.0/float(0xffffffffU)) - 1.0); + float3 noise2 = normalize(float3(n2) * (2.0/float(0xffffffffU)) - 1.0); + furVectors[0] += noise0 * _FurVector.w * _FurRandomize; + furVectors[1] += noise1 * _FurVector.w * _FurRandomize; + furVectors[2] += noise2 * _FurVector.w * _FurRandomize; + #endif + #if defined(LIL_FEATURE_FurLengthMask) + furVectors[0] *= LIL_SAMPLE_2D_LOD(_FurLengthMask, lil_sampler_linear_repeat, input[0].uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).r; + furVectors[1] *= LIL_SAMPLE_2D_LOD(_FurLengthMask, lil_sampler_linear_repeat, input[1].uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).r; + furVectors[2] *= LIL_SAMPLE_2D_LOD(_FurLengthMask, lil_sampler_linear_repeat, input[2].uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).r; + #endif + + if(_FurLayerNum == 1) + { + AppendFur(outStream, output, input, furVectors, float3(1.0, 0.0, 0.0) / 1.0); + AppendFur(outStream, output, input, furVectors, float3(0.0, 1.0, 0.0) / 1.0); + AppendFur(outStream, output, input, furVectors, float3(0.0, 0.0, 1.0) / 1.0); + } + else if(_FurLayerNum >= 2) + { + AppendFur(outStream, output, input, furVectors, float3(1.0, 0.0, 0.0) / 1.0); + AppendFur(outStream, output, input, furVectors, float3(0.0, 1.0, 1.0) / 2.0); + AppendFur(outStream, output, input, furVectors, float3(0.0, 1.0, 0.0) / 1.0); + AppendFur(outStream, output, input, furVectors, float3(1.0, 0.0, 1.0) / 2.0); + AppendFur(outStream, output, input, furVectors, float3(0.0, 0.0, 1.0) / 1.0); + AppendFur(outStream, output, input, furVectors, float3(1.0, 1.0, 0.0) / 2.0); + } + if(_FurLayerNum >= 3) + { + AppendFur(outStream, output, input, furVectors, float3(1.0, 4.0, 1.0) / 6.0); + AppendFur(outStream, output, input, furVectors, float3(0.0, 1.0, 1.0) / 2.0); + AppendFur(outStream, output, input, furVectors, float3(1.0, 1.0, 4.0) / 6.0); + AppendFur(outStream, output, input, furVectors, float3(1.0, 0.0, 1.0) / 2.0); + AppendFur(outStream, output, input, furVectors, float3(4.0, 1.0, 1.0) / 6.0); + AppendFur(outStream, output, input, furVectors, float3(1.0, 1.0, 0.0) / 2.0); + } + AppendFur(outStream, output, input, furVectors, float3(1.0, 0.0, 0.0) / 1.0); + outStream.RestartStrip(); + } +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl.meta new file mode 100644 index 00000000..470154c9 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 977387656ea233a498cc7a2d907e429f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl new file mode 100644 index 00000000..5049951f --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl @@ -0,0 +1,176 @@ +//------------------------------------------------------------------------------------------------------------------------------ +// FakeFur (based on UnlitWF/UnToon by whiteflare, MIT License) +// https://github.com/whiteflare/Unlit_WF_ShaderSuite +#if defined(LIL_V2G_FURVECTOR) + float3 fvc = (input[0].furVector +input[1].furVector +input[2].furVector) *0.333333333333; +#endif +#if defined(LIL_V2G_POSITION_WS) + float3 wpc = (input[0].positionWS +input[1].positionWS +input[2].positionWS) *0.333333333333; +#endif +#if defined(LIL_V2G_TEXCOORD0) + float2 uv0c = (input[0].uv0 +input[1].uv0 +input[2].uv0) *0.333333333333; +#endif +#if defined(LIL_V2G_TEXCOORD1) + float2 uv1c = (input[0].uv1 +input[1].uv1 +input[2].uv1) *0.333333333333; +#endif +#if defined(LIL_V2G_TEXCOORD2) + float2 uv1c = (input[0].uv2 +input[1].uv2 +input[2].uv2) *0.333333333333; +#endif +#if defined(LIL_V2G_TEXCOORD3) + float2 uv1c = (input[0].uv3 +input[1].uv3 +input[2].uv3) *0.333333333333; +#endif +#if defined(LIL_V2G_PACKED_TEXCOORD01) + float4 uv01c = (input[0].uv01 +input[1].uv01 +input[2].uv01) *0.333333333333; +#endif +#if defined(LIL_V2G_PACKED_TEXCOORD23) + float4 uv23c = (input[0].uv23 +input[1].uv23 +input[2].uv23) *0.333333333333; +#endif +#if defined(LIL_V2G_NORMAL_WS) + float3 ndc = (input[0].normalWS +input[1].normalWS +input[2].normalWS) *0.333333333333; +#endif +#if defined(LIL_V2F_LIGHTCOLOR) && defined(LIL_FEATURE_LTCGI) && defined(LIL_PASS_FORWARD) + float3 lcc = (input[0].lightColor +input[1].lightColor +input[2].lightColor) * 0.333333333333; +#endif +#if defined(LIL_V2G_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP)) + LIL_VERTEXLIGHT_FOG_TYPE vlfc = (input[0].vlf + input[1].vlf + input[2].vlf) * 0.333333333333; +#endif +#if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + float3 pwpc = (input[0].previousPositionWS + input[1].previousPositionWS + input[2].previousPositionWS) *0.333333333333; +#endif + +for(uint fl = 0; fl < _FurLayerNum; fl++) +{ + float lpmix = fl/(float)_FurLayerNum; + for(int ii=0;ii<4;ii++) + { + int ii2 = ii==3 ? 0 : ii; + + // Common + float2 outUV = lerp(input[ii2].uv0,uv0c,lpmix); + #if defined(LIL_V2F_TEXCOORD0) + output.uv0 = outUV; + #endif + #if defined(LIL_V2F_TEXCOORD1) + output.uv1 = lerp(input[ii2].uv1,uv1c,lpmix); + #endif + #if defined(LIL_V2F_TEXCOORD2) + output.uv2 = lerp(input[ii2].uv2,uv2c,lpmix); + #endif + #if defined(LIL_V2F_TEXCOORD3) + output.uv3 = lerp(input[ii2].uv3,uv3c,lpmix); + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD01) + output.uv01 = lerp(input[ii2].uv01,uv01c,lpmix); + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD23) + output.uv23 = lerp(input[ii2].uv23,uv23c,lpmix); + #endif + #if defined(LIL_V2F_NORMAL_WS) + output.normalWS = lerp(input[ii2].normalWS,ndc,lpmix); + #endif + #if defined(LIL_V2F_LIGHTCOLOR) && defined(LIL_FEATURE_LTCGI) && defined(LIL_PASS_FORWARD) + output.lightColor = lerp(input[ii2].lightColor,lcc,lpmix); + #endif + #if defined(LIL_V2F_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP)) + output.vlf = lerp(input[ii2].vlf,vlfc,lpmix); + #endif + + float3 fvmix = lerp(input[ii2].furVector,fvc,lpmix); + float3 furVector = normalize(fvmix); + #if !defined(LIL_NOT_SUPPORT_VERTEXID) + uint3 n0 = (input[0].vertexID * input[1].vertexID * input[2].vertexID + (fl * 439853 + ii * 364273 + 1)) * uint3(1597334677U, 3812015801U, 2912667907U); + float3 noise0 = normalize(float3(n0) * (2.0/float(0xffffffffU)) - 1.0); + fvmix += noise0 * _FurVector.w * _FurRandomize; + #endif + #if defined(LIL_FEATURE_FurLengthMask) + fvmix *= LIL_SAMPLE_2D_LOD(_FurLengthMask, lil_sampler_linear_repeat, outUV * _MainTex_ST.xy + _MainTex_ST.zw, 0).r; + #endif + + // In + float3 positionWS = lerp(input[ii2].positionWS,wpc,lpmix); + #if defined(LIL_V2F_POSITION_WS) + output.positionWS = positionWS; + #endif + #if defined(LIL_V2F_POSITION_CS) + output.positionCS = lilTransformWStoCS(positionWS); + #endif + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + float3 previousPositionWS = lerp(input[ii2].previousPositionWS,pwpc,lpmix); + output.previousPositionCS = mul(LIL_MATRIX_PREV_VP, float4(previousPositionWS, 1.0)); + #endif + #if defined(LIL_V2F_FURLAYER) + output.furLayer = 0; + #endif + #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) + //------------------------------------------------------------------------------------------------------------------------------ + // Clipping Canceller + #if defined(UNITY_REVERSED_Z) + // DirectX + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; + } + #else + // OpenGL + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; + } + #endif + #endif + #if defined(LIL_FUR_PRE) + #if defined(UNITY_REVERSED_Z) + // DirectX + output.positionCS.z -= 0.0000001; + #else + // OpenGL + output.positionCS.z += 0.0000001; + #endif + #endif + outStream.Append(output); + + // Out + positionWS += fvmix; + #if defined(LIL_V2F_POSITION_WS) + output.positionWS = positionWS; + #endif + #if defined(LIL_V2F_POSITION_CS) + output.positionCS = lilTransformWStoCS(positionWS); + #endif + #if defined(LIL_PASS_MOTIONVECTOR_INCLUDED) + previousPositionWS.xyz += fvmix; + output.previousPositionCS = mul(LIL_MATRIX_PREV_VP, float4(previousPositionWS, 1.0)); + #endif + #if defined(LIL_V2F_FURLAYER) + output.furLayer = 1; + #endif + #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) + //------------------------------------------------------------------------------------------------------------------------------ + // Clipping Canceller + #if defined(UNITY_REVERSED_Z) + // DirectX + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; + } + #else + // OpenGL + if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) + { + output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; + } + #endif + #endif + #if defined(LIL_FUR_PRE) + #if defined(UNITY_REVERSED_Z) + // DirectX + output.positionCS.z -= 0.0000001; + #else + // OpenGL + output.positionCS.z += 0.0000001; + #endif + #endif + outStream.Append(output); + } + outStream.RestartStrip(); +} \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl.meta new file mode 100644 index 00000000..981e1e7d --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_common_vert_fur_thirdparty.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e3dbe4ae202b9094eab458bbc934c964 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl new file mode 100644 index 00000000..a43ccbc8 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl @@ -0,0 +1,86 @@ +#ifndef LIL_PASS_DEPTHNORMAL_INCLUDED +#define LIL_PASS_DEPTHNORMAL_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#define LIL_V2F_POSITION_CS +#define LIL_V2F_NORMAL_WS +#if defined(LIL_V2F_FORCE_TEXCOORD0) || (LIL_RENDER > 0) + #if defined(LIL_FUR) + #define LIL_V2F_TEXCOORD0 + #else + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #endif +#endif +#if defined(LIL_V2F_FORCE_POSITION_OS) || ((LIL_RENDER > 0) && !defined(LIL_LITE) && defined(LIL_FEATURE_DISSOLVE)) + #define LIL_V2F_POSITION_OS +#endif +#if defined(LIL_V2F_FORCE_POSITION_WS) || (LIL_RENDER > 0) && defined(LIL_FEATURE_DISTANCE_FADE) + #define LIL_V2F_POSITION_WS +#endif + +struct v2f +{ + float4 positionCS : SV_POSITION; + float3 normalWS : TEXCOORD0; + #if defined(LIL_V2F_TEXCOORD0) + float2 uv0 : TEXCOORD1; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD01) + float4 uv01 : TEXCOORD1; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD23) + float4 uv23 : TEXCOORD2; + #endif + #if defined(LIL_V2F_POSITION_OS) + float4 positionOSdissolve : TEXCOORD3; + #endif + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD4; + #endif + LIL_CUSTOM_V2F_MEMBER(5,6,7,8,9,10,11,12) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#define LIL_NORMALIZE_NORMAL_IN_VS +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input LIL_VFACE(facing)) : SV_Target +{ + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + + #include "lil_common_frag_alpha.hlsl" + + #if LIL_SRP_VERSION_GREATER_EQUAL(10, 1) + float3 normalDirection = normalize(input.normalWS); + normalDirection = fd.facing < (_FlipNormal-1.0) ? -normalDirection : normalDirection; + normalDirection = normalize(normalDirection); + #if !(LIL_SRP_VERSION_GREATER_EQUAL(12, 1)) || defined(_GBUFFER_NORMALS_OCT) + return float4(PackNormalOctRectEncode(normalDirection), 0.0, 0.0); + #else + return float4(normalDirection, 0.0); + #endif + #else + return 0; + #endif +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl.meta new file mode 100644 index 00000000..25bc04f2 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_depthnormals.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5f0659d685a03dc4c8bb13bb7ce1666c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl new file mode 100644 index 00000000..7972112e --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl @@ -0,0 +1,165 @@ +#ifndef LIL_PASS_DEPTHONLY_INCLUDED +#define LIL_PASS_DEPTHONLY_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#define LIL_V2F_POSITION_CS +#if defined(LIL_V2F_FORCE_TEXCOORD0) || (LIL_RENDER > 0) + #if defined(LIL_FUR) + #define LIL_V2F_TEXCOORD0 + #else + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #endif +#endif +#if defined(LIL_V2F_FORCE_POSITION_OS) || ((LIL_RENDER > 0) && !defined(LIL_LITE) && defined(LIL_FEATURE_DISSOLVE)) + #define LIL_V2F_POSITION_OS +#endif +#if defined(LIL_V2F_FORCE_POSITION_WS) || (LIL_RENDER > 0) && defined(LIL_FEATURE_DISTANCE_FADE) + #define LIL_V2F_POSITION_WS +#endif +#if defined(LIL_V2F_FORCE_NORMAL) || defined(WRITE_NORMAL_BUFFER) + #define LIL_V2F_NORMAL_WS +#endif +#if defined(LIL_FUR) + #define LIL_V2F_FURLAYER +#endif + +struct v2f +{ + float4 positionCS : SV_POSITION; + #if defined(LIL_V2F_TEXCOORD0) + float2 uv0 : TEXCOORD0; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD01) + float4 uv01 : TEXCOORD0; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD23) + float4 uv23 : TEXCOORD1; + #endif + #if defined(LIL_V2F_POSITION_OS) + float4 positionOSdissolve : TEXCOORD2; + #endif + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD3; + #endif + #if defined(LIL_V2F_NORMAL_WS) + float3 normalWS : TEXCOORD4; + #endif + #if defined(LIL_FUR) + float furLayer : TEXCOORD5; + #endif + LIL_CUSTOM_V2F_MEMBER(6,7,8,9,10,11,12,13) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +#if defined(LIL_FUR) && defined(LIL_HDRP) + #define LIL_V2G_TEXCOORD0 + #define LIL_V2G_POSITION_WS + #if defined(LIL_V2G_FORCE_NORMAL_WS) || defined(WRITE_NORMAL_BUFFER) + #define LIL_V2G_NORMAL_WS + #endif + #define LIL_V2G_FURVECTOR + #define LIL_V2G_VERTEXID + + struct v2g + { + float3 positionWS : TEXCOORD0; + float2 uv0 : TEXCOORD1; + float3 furVector : TEXCOORD2; + uint vertexID : TEXCOORD3; + #if defined(LIL_V2G_NORMAL_WS) + float3 normalWS : TEXCOORD4; + #endif + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#elif defined(LIL_ONEPASS_OUTLINE) + struct v2g + { + v2f base; + float4 positionCSOL : TEXCOORD5; + }; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#if defined(LIL_FUR) && defined(LIL_HDRP) + #include "lil_common_vert_fur.hlsl" +#else + #include "lil_common_vert.hlsl" +#endif +#include "lil_common_frag.hlsl" + +void frag(v2f input + LIL_VFACE(facing) + #if defined(SCENESELECTIONPASS) || defined(SCENEPICKINGPASS) || !defined(LIL_HDRP) + , out float4 outColor : SV_Target0 + #else + #ifdef WRITE_MSAA_DEPTH + , out float4 depthColor : SV_Target0 + #ifdef WRITE_NORMAL_BUFFER + , out float4 outNormalBuffer : SV_Target1 + #endif + #else + #ifdef WRITE_NORMAL_BUFFER + , out float4 outNormalBuffer : SV_Target0 + #endif + #endif + #endif +) +{ + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + + #include "lil_common_frag_alpha.hlsl" + + #if !defined(LIL_HDRP) + outColor = 0; + #elif defined(SCENESELECTIONPASS) + outColor = float4(_ObjectId, _PassValue, 1.0, 1.0); + #elif defined(SCENEPICKINGPASS) + outColor = _SelectionID; + #else + #ifdef WRITE_MSAA_DEPTH + depthColor = input.positionCS.z; + #ifdef _ALPHATOMASK_ON + #if LIL_RENDER > 0 + depthColor.a = saturate((alpha - _Cutoff) / max(fwidth(alpha), 0.0001) + 0.5); + #else + depthColor.a = 1.0; + #endif + #endif + #endif + + #if defined(WRITE_NORMAL_BUFFER) + float3 normalDirection = normalize(input.normalWS); + normalDirection = fd.facing < (_FlipNormal-1.0) ? -normalDirection : normalDirection; + + const float seamThreshold = 1.0 / 1024.0; + normalDirection.z = CopySign(max(seamThreshold, abs(normalDirection.z)), normalDirection.z); + float2 octNormalWS = PackNormalOctQuadEncode(normalDirection); + float3 packNormalWS = PackFloat2To888(saturate(octNormalWS * 0.5 + 0.5)); + outNormalBuffer = float4(packNormalWS, 1.0); + #endif + #endif +} + +#if defined(LIL_TESSELLATION) + #include "lil_tessellation.hlsl" +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl.meta new file mode 100644 index 00000000..5dcf949d --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_depthonly.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ddad648396307fe44a229338e4f0ea51 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl new file mode 100644 index 00000000..0924361c --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl @@ -0,0 +1,10 @@ +#ifndef LIL_PASS_FORWARD_INCLUDED +#define LIL_PASS_FORWARD_INCLUDED + +#if defined(LIL_LITE) + #include "lil_pass_forward_lite.hlsl" +#else + #include "lil_pass_forward_normal.hlsl" +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl.meta new file mode 100644 index 00000000..4bee4f5e --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 076cc9ffbcf86c34fb987ced16c938b8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl new file mode 100644 index 00000000..f0e8b124 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl @@ -0,0 +1,87 @@ +#ifndef LIL_PASS_FORWARD_FAKESHADOW_INCLUDED +#define LIL_PASS_FORWARD_FAKESHADOW_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +struct v2f +{ + float4 positionCS : SV_POSITION; + float2 uv0 : TEXCOORD0; + LIL_VERTEXLIGHT_FOG_COORDS(1) + #if defined(LIL_HDRP) || defined(LIL_V2F_FORCE_POSITION_WS) + float3 positionWS : TEXCOORD2; + #endif + LIL_CUSTOM_V2F_MEMBER(3,4,5,6,7,8,9,10) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +v2f vert(appdata input) +{ + v2f output; + LIL_INITIALIZE_STRUCT(v2f, output); + + if(_Invisible) return output; + + LIL_SETUP_INSTANCE_ID(input); + LIL_TRANSFER_INSTANCE_ID(input, output); + LIL_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + //------------------------------------------------------------------------------------------------------------------------------ + // Encryption + #include "lil_vert_encryption.hlsl" + + LIL_VERTEX_POSITION_INPUTS(input.positionOS, vertexInput); + #if defined(LIL_HDRP) + LIL_VERTEX_NORMAL_INPUTS(input.normalOS, vertexNormalInput); + lilFragData fd = lilInitFragData(); + LIL_GET_HDRPDATA(vertexInput,fd); + float3 lightColor; + float3 lightDirection; + lilGetLightDirectionAndColor(lightDirection, lightColor, posInput); + lightDirection = normalize(lightDirection * Luminance(lightColor) + unity_SHAr.xyz * 0.333333 + unity_SHAg.xyz * 0.333333 + unity_SHAb.xyz * 0.333333 + float3(0.0,0.001,0.0)); + output.positionWS = vertexInput.positionWS; + #else + float3 lightDirection = normalize(lilGetLightDirection() + length(_FakeShadowVector.xyz) * normalize(mul((float3x3)LIL_MATRIX_M, _FakeShadowVector.xyz))); + #endif + float4 lightShift = mul(LIL_MATRIX_VP, float4(lightDirection * _FakeShadowVector.w, 0)); + output.positionCS = vertexInput.positionCS; + output.positionCS -= lightShift; + output.uv0 = input.uv0 * _MainTex_ST.xy + _MainTex_ST.zw; + LIL_TRANSFER_FOG(vertexInput, output); + + return output; +} + +float4 frag(v2f input) : SV_Target +{ + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + fd.uv0 = input.uv0; + #if defined(LIL_HDRP) || defined(LIL_V2F_FORCE_POSITION_WS) + fd.positionWS = input.positionWS; + #endif + LIL_GET_HDRPDATA(input,fd); + #if defined(LIL_HDRP) + fd.V = normalize(lilViewDirection(fd.positionWS)); + #endif + fd.col = LIL_SAMPLE_2D(_MainTex, sampler_MainTex, fd.uv0); + fd.col *= _Color; + LIL_HDRP_DEEXPOSURE(fd.col); + float4 fogColor = float4(1,1,1,1); + LIL_APPLY_FOG_COLOR(fd.col, input, fogColor); + return fd.col; +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl.meta new file mode 100644 index 00000000..ec60c539 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fakeshadow.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 50f1d3c5ad5f4534ea4aade1f5ef1833 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl new file mode 100644 index 00000000..9ede1a05 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl @@ -0,0 +1,202 @@ +#ifndef LIL_PASS_FORWARD_FUR_INCLUDED +#define LIL_PASS_FORWARD_FUR_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2G_MEMBER) + #define LIL_CUSTOM_V2G_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +// v2g +#define LIL_V2G_TEXCOORD0 +#define LIL_V2G_POSITION_WS +#define LIL_V2G_NORMAL_WS +#if !defined(LIL_PASS_FORWARDADD) + #define LIL_V2G_LIGHTCOLOR + #define LIL_V2G_LIGHTDIRECTION + #if defined(LIL_FEATURE_SHADOW) + #define LIL_V2G_INDLIGHTCOLOR + #endif +#endif +#define LIL_V2G_VERTEXLIGHT_FOG +#define LIL_V2G_FURVECTOR +#define LIL_V2G_VERTEXID + +// g2f +#define LIL_V2F_POSITION_CS +#define LIL_V2F_POSITION_WS +#define LIL_V2F_TEXCOORD0 +#define LIL_V2F_NORMAL_WS + +#if !defined(LIL_PASS_FORWARDADD) + #define LIL_V2F_LIGHTCOLOR + #define LIL_V2F_LIGHTDIRECTION + #if defined(LIL_FEATURE_SHADOW) + #define LIL_V2F_INDLIGHTCOLOR + #endif +#endif +#define LIL_V2F_VERTEXLIGHT_FOG +#define LIL_V2F_FURLAYER + +struct v2g +{ + float2 uv0 : TEXCOORD0; + float3 positionWS : TEXCOORD1; + float3 furVector : TEXCOORD2; + uint vertexID : TEXCOORD3; + float3 normalWS : TEXCOORD4; + LIL_LIGHTCOLOR_COORDS(5) + LIL_LIGHTDIRECTION_COORDS(6) + LIL_INDLIGHTCOLOR_COORDS(7) + LIL_VERTEXLIGHT_FOG_COORDS(8) + LIL_CUSTOM_V2G_MEMBER(9,10,11,12,13,14,15,16) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +struct v2f +{ + float4 positionCS : SV_POSITION; + float2 uv0 : TEXCOORD0; + float3 positionWS : TEXCOORD1; + LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD2; + float furLayer : TEXCOORD3; + LIL_LIGHTCOLOR_COORDS(4) + LIL_LIGHTDIRECTION_COORDS(5) + LIL_INDLIGHTCOLOR_COORDS(6) + LIL_VERTEXLIGHT_FOG_COORDS(7) + LIL_CUSTOM_V2F_MEMBER(8,9,10,11,12,13,14,15) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#include "lil_common_vert_fur.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input) : SV_Target +{ + //------------------------------------------------------------------------------------------------------------------------------ + // Initialize + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_GET_HDRPDATA(input,fd); + #if defined(LIL_V2F_SHADOW) || defined(LIL_PASS_FORWARDADD) + LIL_LIGHT_ATTENUATION(fd.attenuation, input); + #endif + LIL_GET_LIGHTING_DATA(input,fd); + + //------------------------------------------------------------------------------------------------------------------------------ + // View Direction + #if defined(LIL_V2F_POSITION_WS) + LIL_GET_POSITION_WS_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) + LIL_GET_TBN_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) && defined(LIL_V2F_POSITION_WS) + LIL_GET_PARALLAX_DATA(input,fd); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // UV + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + BEFORE_CALC_DDX_DDY + OVERRIDE_CALC_DDX_DDY + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + BEFORE_MAIN + OVERRIDE_MAIN + + //------------------------------------------------------------------------------------------------------------------------------ + // Fur + BEFORE_FUR + OVERRIDE_FUR + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + fd.albedo = fd.col.rgb; + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha + #if LIL_RENDER == 1 || defined(LIL_FUR_PRE) + // Cutout + fd.col.a = saturate(fd.col.a*5.0-2.0); + if(fd.col.a == 0) discard; + #else + // Transparent + clip(fd.col.a - _Cutoff); + #endif + + fd.origN = normalize(input.normalWS); + fd.N = normalize(input.normalWS); + + BEFORE_SHADOW + #ifndef LIL_PASS_FORWARDADD + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + #if defined(LIL_FEATURE_SHADOW) + fd.ln = dot(fd.L, fd.N); + OVERRIDE_SHADOW + fd.col.rgb += fd.albedo * fd.addLightColor; + fd.col.rgb = min(fd.col.rgb, fd.albedo * _LightMaxLimit); + #else + fd.col.rgb *= saturate(fd.lightColor + fd.addLightColor); + #endif + #else + #if defined(LIL_FEATURE_SHADOW) && defined(LIL_OPTIMIZE_APPLY_SHADOW_FA) + fd.ln = dot(fd.L, fd.N); + OVERRIDE_SHADOW + #else + fd.col.rgb *= fd.lightColor; + #endif + + #if LIL_RENDER == 2 && !defined(LIL_FUR_PRE) + fd.col.rgb *= saturate(fd.col.a * _AlphaBoostFA); + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim Shade + BEFORE_RIMSHADE + #if defined(LIL_FEATURE_RIMSHADE) + OVERRIDE_RIMSHADE + #endif + + fd.col.rgb += input.furLayer * pow((1-abs(dot(normalize(fd.N), fd.V))), _FurRimFresnelPower) * lerp(1,lilGray(fd.invLighting), _FurRimAntiLight) * _FurRimColor.rgb * fd.lightColor; + + //------------------------------------------------------------------------------------------------------------------------------ + // Distance Fade + BEFORE_DISTANCE_FADE + #if defined(LIL_FEATURE_DISTANCE_FADE) + OVERRIDE_DISTANCE_FADE + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Fix Color + LIL_HDRP_DEEXPOSURE(fd.col); + + //------------------------------------------------------------------------------------------------------------------------------ + // Fog + BEFORE_FOG + OVERRIDE_FOG + + BEFORE_OUTPUT + OVERRIDE_OUTPUT +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl.meta new file mode 100644 index 00000000..169365d3 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_fur.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: df484952219ee584393f59fa74d13996 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl new file mode 100644 index 00000000..2899ab1f --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl @@ -0,0 +1,313 @@ +#ifndef LIL_PASS_FORWARD_GEM_INCLUDED +#define LIL_PASS_FORWARD_GEM_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#if defined(LIL_GEM_PRE) + #define LIL_V2F_POSITION_CS + #if defined(LIL_V2F_FORCE_POSITION_WS) || defined(LIL_HDRP) + #define LIL_V2F_POSITION_WS + #endif + #define LIL_V2F_VERTEXLIGHT_FOG + + struct v2f + { + float4 positionCS : SV_POSITION; + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD0; + #endif + LIL_VERTEXLIGHT_FOG_COORDS(1) + LIL_CUSTOM_V2F_MEMBER(2,3,4,5,6,7,8,9) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#else + #define LIL_V2F_POSITION_CS + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #if defined(LIL_V2F_FORCE_POSITION_OS) || defined(LIL_SHOULD_POSITION_OS) + #define LIL_V2F_POSITION_OS + #endif + #define LIL_V2F_POSITION_WS + #define LIL_V2F_NORMAL_WS + #if defined(LIL_V2F_FORCE_TANGENT) || defined(LIL_SHOULD_TBN) + #define LIL_V2F_TANGENT_WS + #endif + #if !defined(LIL_PASS_FORWARDADD) + #define LIL_V2F_LIGHTCOLOR + #define LIL_V2F_LIGHTDIRECTION + #endif + #define LIL_V2F_VERTEXLIGHT_FOG + + struct v2f + { + float4 positionCS : SV_POSITION; + float4 uv01 : TEXCOORD0; + float4 uv23 : TEXCOORD1; + float3 positionWS : TEXCOORD2; + LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD3; + #if defined(LIL_V2F_TANGENT_WS) + LIL_VECTOR_INTERPOLATION float4 tangentWS : TEXCOORD4; + #endif + #if defined(LIL_V2F_POSITION_OS) + float4 positionOSdissolve : TEXCOORD5; + #endif + LIL_LIGHTCOLOR_COORDS(6) + LIL_LIGHTDIRECTION_COORDS(7) + LIL_VERTEXLIGHT_FOG_COORDS(8) + LIL_CUSTOM_V2F_MEMBER(9,10,11,12,13,14,15,16) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#endif + +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#if defined(LIL_GEM_PRE) + float4 frag(v2f input) : SV_Target + { + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_GET_HDRPDATA(input,fd); + #if defined(LIL_HDRP) + fd.V = normalize(lilViewDirection(input.positionWS)); + #endif + fd.col = 0; + OVERRIDE_FOG + return fd.col; + } +#else + float4 frag(v2f input LIL_VFACE(facing)) : SV_Target + { + //------------------------------------------------------------------------------------------------------------------------------ + // Initialize + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + LIL_GET_HDRPDATA(input,fd); + #if defined(LIL_V2F_SHADOW) || defined(LIL_PASS_FORWARDADD) + LIL_LIGHT_ATTENUATION(fd.attenuation, input); + #endif + LIL_GET_LIGHTING_DATA(input,fd); + + //------------------------------------------------------------------------------------------------------------------------------ + // UDIM Discard + #if defined(LIL_FEATURE_UDIMDISCARD) + OVERRIDE_UDIMDISCARD + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // View Direction + #if defined(LIL_V2F_POSITION_WS) + LIL_GET_POSITION_WS_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) + LIL_GET_TBN_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) && defined(LIL_V2F_POSITION_WS) + LIL_GET_PARALLAX_DATA(input,fd); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // UV + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + BEFORE_CALC_DDX_DDY + OVERRIDE_CALC_DDX_DDY + + //------------------------------------------------------------------------------------------------------------------------------ + // Gem View Direction + float3 gemViewDirection = lilBlendVRParallax(fd.headV, fd.V, _GemVRParallaxStrength); + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + BEFORE_MAIN + OVERRIDE_MAIN + + //------------------------------------------------------------------------------------------------------------------------------ + // Normal + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + float3 normalmap = float3(0.0,0.0,1.0); + + // 1st + BEFORE_NORMAL_1ST + #if defined(LIL_FEATURE_NORMAL_1ST) + OVERRIDE_NORMAL_1ST + #endif + + // 2nd + BEFORE_NORMAL_2ND + #if defined(LIL_FEATURE_NORMAL_2ND) + OVERRIDE_NORMAL_2ND + #endif + + fd.N = mul(normalmap, fd.TBN); + fd.N = fd.facing < 0.0 ? -fd.N - fd.V * 0.2 : fd.N; + fd.N = normalize(fd.N); + #else + fd.N = input.normalWS; + fd.N = fd.facing < 0.0 ? -fd.N - fd.V * 0.2 : fd.N; + fd.N = normalize(fd.N); + #endif + fd.origN = normalize(input.normalWS); + fd.uvMat = mul(fd.cameraMatrix, fd.N).xy * 0.5 + 0.5; + fd.reflectionN = fd.N; + fd.matcapN = fd.N; + fd.matcap2ndN = fd.N; + + fd.nvabs = abs(dot(fd.N, fd.V)); + fd.nv = fd.nvabs; + fd.uvRim = float2(fd.nvabs,fd.nvabs); + float nv1 = abs(dot(fd.N, gemViewDirection)); + float nv2 = abs(dot(fd.N, gemViewDirection.yzx)); + float nv3 = abs(dot(fd.N, gemViewDirection.zxy)); + float invnv = 1-nv1; + fd.ln = dot(fd.L, fd.N); + + //------------------------------------------------------------------------------------------------------------------------------ + // Anisotropy + BEFORE_ANISOTROPY + #if defined(LIL_FEATURE_ANISOTROPY) + OVERRIDE_ANISOTROPY + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // AudioLink + BEFORE_AUDIOLINK + #if defined(LIL_FEATURE_AUDIOLINK) + OVERRIDE_AUDIOLINK + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + #ifndef LIL_PASS_FORWARDADD + fd.shadowmix = saturate(fd.ln); + fd.lightColor = saturate(fd.lightColor + fd.addLightColor); + fd.shadowmix = saturate(fd.shadowmix + lilLuminance(fd.addLightColor)); + #endif + + fd.albedo = fd.col.rgb; + fd.col.rgb *= fd.nv; + float4 baseCol = fd.col; + fd.col.rgb *= 0.75; + + //------------------------------------------------------------------------------------------------------------------------------ + // Refraction + float2 ref = mul((float3x3)LIL_MATRIX_V, fd.N).xy; + float nvRef = pow(saturate(1.0 - fd.nv), _RefractionFresnelPower); + float3 refractColor; + refractColor.r = LIL_GET_BG_TEX(fd.uvScn + (nvRef * _RefractionStrength) * ref, 0).r; + refractColor.g = LIL_GET_BG_TEX(fd.uvScn + (nvRef * (_RefractionStrength + _GemChromaticAberration)) * ref, 0).g; + refractColor.b = LIL_GET_BG_TEX(fd.uvScn + (nvRef * (_RefractionStrength + _GemChromaticAberration * 2)) * ref, 0).b; + refractColor = pow(saturate(refractColor), _GemEnvContrast) * _GemEnvContrast; + refractColor = lerp(dot(refractColor, float3(1.0/3.0,1.0/3.0,1.0/3.0)), refractColor, saturate(1.0/_GemEnvContrast)); + fd.col.rgb *= refractColor; + + //------------------------------------------------------------------------------------------------------------------------------ + // Reflection + fd.smoothness = _Smoothness; + #if defined(LIL_FEATURE_SmoothnessTex) + fd.smoothness *= LIL_SAMPLE_2D(_SmoothnessTex, sampler_MainTex, fd.uvMain).r; + #endif + fd.perceptualRoughness = fd.perceptualRoughness - fd.smoothness * fd.perceptualRoughness; + fd.roughness = fd.perceptualRoughness * fd.perceptualRoughness; + + float3 normalDirectionR = fd.N; + float3 normalDirectionG = fd.facing < 0.0 ? normalize(fd.N + fd.V * invnv * _GemChromaticAberration) : fd.N; + float3 normalDirectionB = fd.facing < 0.0 ? normalize(fd.N + fd.V * invnv * _GemChromaticAberration * 2) : fd.N; + float envReflectionColorR = LIL_GET_ENVIRONMENT_REFLECTION(fd.V, normalDirectionR, fd.perceptualRoughness, fd.positionWS).r; + float envReflectionColorG = LIL_GET_ENVIRONMENT_REFLECTION(fd.V, normalDirectionG, fd.perceptualRoughness, fd.positionWS).g; + float envReflectionColorB = LIL_GET_ENVIRONMENT_REFLECTION(fd.V, normalDirectionB, fd.perceptualRoughness, fd.positionWS).b; + + float3 envReflectionColor = float3(envReflectionColorR, envReflectionColorG, envReflectionColorB); + envReflectionColor = pow(saturate(envReflectionColor), _GemEnvContrast) * _GemEnvContrast * _GemEnvColor.rgb; + envReflectionColor = lerp(dot(envReflectionColor, float3(1.0/3.0,1.0/3.0,1.0/3.0)), envReflectionColor, saturate(1.0/_GemEnvContrast)); + envReflectionColor = fd.facing < 0.0 ? envReflectionColor * baseCol.rgb : envReflectionColor; + + float oneMinusReflectivity = LIL_DIELECTRIC_SPECULAR.a; + float grazingTerm = saturate(fd.smoothness + (1.0-oneMinusReflectivity)); + #ifdef LIL_COLORSPACE_GAMMA + float surfaceReduction = 1.0 - 0.28 * fd.roughness * fd.perceptualRoughness; + #else + float surfaceReduction = 1.0 / (fd.roughness * fd.roughness + 1.0); + #endif + + float particle = step(0.5, frac(nv1 * _GemParticleLoop)) * step(0.5, frac(nv2 * _GemParticleLoop)) * step(0.5, frac(nv3 * _GemParticleLoop)); + float3 particleColor = fd.facing < 0.0 ? 1.0 + particle * _GemParticleColor.rgb : 1.0; + + fd.col.rgb += (surfaceReduction * lilFresnelLerp(_Reflectance, grazingTerm, fd.nv) + 0.5) * 0.5 * particleColor * envReflectionColor; + + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap + BEFORE_MATCAP + #if defined(LIL_FEATURE_MATCAP) + OVERRIDE_MATCAP + #endif + + BEFORE_MATCAP_2ND + #if defined(LIL_FEATURE_MATCAP_2ND) + OVERRIDE_MATCAP_2ND + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim light + BEFORE_RIMLIGHT + #if defined(LIL_FEATURE_RIMLIGHT) + OVERRIDE_RIMLIGHT + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Glitter + BEFORE_GLITTER + #if defined(LIL_FEATURE_GLITTER) + OVERRIDE_GLITTER + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Emission + BEFORE_EMISSION_1ST + #if defined(LIL_FEATURE_EMISSION_1ST) + OVERRIDE_EMISSION_1ST + #endif + + // Emission2nd + BEFORE_EMISSION_2ND + #if defined(LIL_FEATURE_EMISSION_2ND) + OVERRIDE_EMISSION_2ND + #endif + + BEFORE_BLEND_EMISSION + OVERRIDE_BLEND_EMISSION + + //------------------------------------------------------------------------------------------------------------------------------ + // Fix Color + LIL_HDRP_DEEXPOSURE(fd.col); + + float4 fogColor = float4(0,0,0,0); + BEFORE_FOG + OVERRIDE_FOG + + BEFORE_OUTPUT + OVERRIDE_OUTPUT + } +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl.meta new file mode 100644 index 00000000..cf137235 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d99da3dcbd650a245a828a50cd8ed9af +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl new file mode 100644 index 00000000..b0b0b2ea --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl @@ -0,0 +1,246 @@ +#ifndef LIL_PASS_FORWARD_LITE_INCLUDED +#define LIL_PASS_FORWARD_LITE_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#if defined(LIL_OUTLINE) + #define LIL_V2F_POSITION_CS + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #if defined(LIL_V2F_FORCE_POSITION_WS) || defined(LIL_PASS_FORWARDADD) || !defined(LIL_BRP) || defined(LIL_USE_LPPV) + #define LIL_V2F_POSITION_WS + #endif + #if defined(LIL_V2F_FORCE_NORMAL) || defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SUBTRACTIVE) || defined(LIL_HDRP) + #define LIL_V2F_NORMAL_WS + #endif + #if !defined(LIL_PASS_FORWARDADD) + #define LIL_V2F_LIGHTCOLOR + #endif + #define LIL_V2F_VERTEXLIGHT_FOG + + struct v2f + { + float4 positionCS : SV_POSITION; + float4 uv01 : TEXCOORD0; + float4 uv23 : TEXCOORD1; + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD2; + #endif + #if defined(LIL_V2F_NORMAL_WS) + LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD3; + #endif + LIL_LIGHTCOLOR_COORDS(4) + LIL_VERTEXLIGHT_FOG_COORDS(5) + LIL_CUSTOM_V2F_MEMBER(6,7,8,9,10,11,12,13) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#else + #define LIL_V2F_POSITION_WS + #define LIL_V2F_POSITION_CS + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #define LIL_V2F_NORMAL_WS + #define LIL_V2F_UVMAT + #if !defined(LIL_PASS_FORWARDADD) + #define LIL_V2F_LIGHTCOLOR + #define LIL_V2F_LIGHTDIRECTION + #define LIL_V2F_INDLIGHTCOLOR + #endif + #define LIL_V2F_VERTEXLIGHT_FOG + + struct v2f + { + float4 positionCS : SV_POSITION; + float4 uv01 : TEXCOORD0; + float4 uv23 : TEXCOORD1; + float2 uvMat : TEXCOORD2; + LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD3; + float3 positionWS : TEXCOORD4; + LIL_LIGHTCOLOR_COORDS(5) + LIL_LIGHTDIRECTION_COORDS(6) + LIL_INDLIGHTCOLOR_COORDS(7) + LIL_VERTEXLIGHT_FOG_COORDS(8) + LIL_CUSTOM_V2F_MEMBER(9,10,11,12,13,14,15,16) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input LIL_VFACE(facing)) : SV_Target +{ + //------------------------------------------------------------------------------------------------------------------------------ + // Initialize + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + LIL_GET_HDRPDATA(input,fd); + #if defined(LIL_V2F_SHADOW) || defined(LIL_PASS_FORWARDADD) + LIL_LIGHT_ATTENUATION(fd.attenuation, input); + #endif + LIL_GET_LIGHTING_DATA(input,fd); + + //------------------------------------------------------------------------------------------------------------------------------ + // View Direction + #if defined(LIL_V2F_POSITION_WS) + LIL_GET_POSITION_WS_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) + LIL_GET_TBN_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) && defined(LIL_V2F_POSITION_WS) + LIL_GET_PARALLAX_DATA(input,fd); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Apply Matelial & Lighting + #if defined(LIL_OUTLINE) + //------------------------------------------------------------------------------------------------------------------------------ + // UV + BEFORE_ANIMATE_OUTLINE_UV + OVERRIDE_ANIMATE_OUTLINE_UV + BEFORE_CALC_DDX_DDY + OVERRIDE_CALC_DDX_DDY + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + BEFORE_OUTLINE_COLOR + OVERRIDE_OUTLINE_COLOR + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha + #if LIL_RENDER == 0 + // Opaque + fd.col.a = 1.0; + #elif LIL_RENDER == 1 + // Cutout + clip(fd.col.a - _Cutoff); + #elif LIL_RENDER == 2 + // Transparent + clip(fd.col.a - _Cutoff); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + fd.albedo = fd.col.rgb; + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + #if defined(LIL_PASS_FORWARDADD) + fd.col.rgb = fd.col.rgb * fd.lightColor * _OutlineEnableLighting; + #else + fd.col.rgb = lerp(fd.col.rgb, fd.col.rgb * min(fd.lightColor + fd.addLightColor, _LightMaxLimit), _OutlineEnableLighting); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Premultiply + LIL_PREMULTIPLY + #else + //------------------------------------------------------------------------------------------------------------------------------ + // UV + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + BEFORE_CALC_DDX_DDY + OVERRIDE_CALC_DDX_DDY + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + BEFORE_MAIN + OVERRIDE_MAIN + fd.triMask = LIL_SAMPLE_2D(_TriMask, sampler_MainTex, fd.uvMain); + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha + #if LIL_RENDER == 0 + // Opaque + fd.col.a = 1.0; + #elif LIL_RENDER == 1 + // Cutout + clip(fd.col.a - _Cutoff); + #elif LIL_RENDER == 2 + // Transparent + clip(fd.col.a - _Cutoff); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Normal + fd.N = normalize(input.normalWS); + fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N; + fd.ln = dot(fd.L, fd.N); + + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap + BEFORE_MATCAP + OVERRIDE_MATCAP + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + fd.albedo = fd.col.rgb; + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + BEFORE_SHADOW + #if !defined(LIL_PASS_FORWARDADD) + OVERRIDE_SHADOW + + fd.lightColor += fd.addLightColor; + fd.shadowmix += lilLuminance(fd.addLightColor); + fd.col.rgb += fd.albedo * fd.addLightColor; + + fd.lightColor = min(fd.lightColor, _LightMaxLimit); + fd.shadowmix = saturate(fd.shadowmix); + fd.col.rgb = min(fd.col.rgb, fd.albedo * _LightMaxLimit); + #else + OVERRIDE_SHADOW + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim light + fd.nvabs = abs(dot(fd.N, fd.V)); + fd.uvRim = float2(fd.nvabs,fd.nvabs); + BEFORE_RIMLIGHT + OVERRIDE_RIMLIGHT + + #ifndef LIL_PASS_FORWARDADD + BEFORE_EMISSION_1ST + OVERRIDE_EMISSION_1ST + + BEFORE_BLEND_EMISSION + OVERRIDE_BLEND_EMISSION + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Premultiply + LIL_PREMULTIPLY + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Fix Color + LIL_HDRP_DEEXPOSURE(fd.col); + + //------------------------------------------------------------------------------------------------------------------------------ + // Fog + BEFORE_FOG + OVERRIDE_FOG + + BEFORE_OUTPUT + OVERRIDE_OUTPUT +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl.meta new file mode 100644 index 00000000..05764901 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_lite.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b5126a711fe38d1448b352f5052c8db4 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl new file mode 100644 index 00000000..ad637340 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl @@ -0,0 +1,581 @@ +#ifndef LIL_PASS_FORWARD_NORMAL_INCLUDED +#define LIL_PASS_FORWARD_NORMAL_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#if defined(LIL_OUTLINE) + #define LIL_V2F_POSITION_CS + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #if defined(LIL_V2F_FORCE_POSITION_OS) || defined(LIL_SHOULD_POSITION_OS) || defined(LIL_FEATURE_IDMASK) + #define LIL_V2F_POSITION_OS + #endif + #if defined(LIL_V2F_FORCE_POSITION_WS) || defined(LIL_PASS_FORWARDADD) || defined(LIL_FEATURE_OUTLINE_RECEIVE_SHADOW) || defined(LIL_FEATURE_DISTANCE_FADE) || !defined(LIL_BRP) || defined(LIL_USE_LPPV) + #define LIL_V2F_POSITION_WS + #endif + #if defined(LIL_V2F_FORCE_NORMAL) || defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SUBTRACTIVE) || defined(LIL_HDRP) + #define LIL_V2F_NORMAL_WS + #endif + #if !defined(LIL_PASS_FORWARDADD) + #define LIL_V2F_LIGHTCOLOR + #if defined(LIL_FEATURE_OUTLINE_RECEIVE_SHADOW) + #define LIL_V2F_SHADOW + #endif + #endif + #define LIL_V2F_VERTEXLIGHT_FOG + #define LIL_V2F_NDOTL + + struct v2f + { + float4 positionCS : SV_POSITION; + float4 uv01 : TEXCOORD0; + float4 uv23 : TEXCOORD1; + #if defined(LIL_V2F_POSITION_OS) + float4 positionOSdissolve : TEXCOORD2; + #endif + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD3; + #endif + #if defined(LIL_V2F_NORMAL_WS) + LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD4; + #endif + float NdotL : TEXCOORD5; + LIL_LIGHTCOLOR_COORDS(6) + LIL_VERTEXLIGHT_FOG_COORDS(7) + #if defined(LIL_V2F_SHADOW) + LIL_SHADOW_COORDS(8) + #endif + LIL_CUSTOM_V2F_MEMBER(9,10,11,12,13,14,15,16) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#else + #define LIL_V2F_POSITION_CS + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #if defined(LIL_V2F_FORCE_POSITION_OS) || defined(LIL_SHOULD_POSITION_OS) || defined(LIL_FEATURE_IDMASK) + #define LIL_V2F_POSITION_OS + #endif + #if defined(LIL_V2F_FORCE_POSITION_WS) || defined(LIL_SHOULD_POSITION_WS) + #define LIL_V2F_POSITION_WS + #endif + #if defined(LIL_V2F_FORCE_NORMAL) || defined(LIL_SHOULD_NORMAL) + #define LIL_V2F_NORMAL_WS + #endif + #if defined(LIL_V2F_FORCE_TANGENT) || defined(LIL_SHOULD_TBN) + #define LIL_V2F_TANGENT_WS + #endif + #if !defined(LIL_PASS_FORWARDADD) + #define LIL_V2F_LIGHTCOLOR + #define LIL_V2F_LIGHTDIRECTION + #if defined(LIL_FEATURE_SHADOW) + #define LIL_V2F_INDLIGHTCOLOR + #endif + #if defined(LIL_FEATURE_SHADOW) || defined(LIL_FEATURE_BACKLIGHT) + #define LIL_V2F_SHADOW + #endif + #endif + #define LIL_V2F_VERTEXLIGHT_FOG + + struct v2f + { + float4 positionCS : SV_POSITION; + float4 uv01 : TEXCOORD0; + float4 uv23 : TEXCOORD1; + #if defined(LIL_V2F_POSITION_OS) + float4 positionOSdissolve : TEXCOORD2; + #endif + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD3; + #endif + #if defined(LIL_V2F_NORMAL_WS) + LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD4; + #endif + #if defined(LIL_V2F_TANGENT_WS) + LIL_VECTOR_INTERPOLATION float4 tangentWS : TEXCOORD5; + #endif + LIL_LIGHTCOLOR_COORDS(6) + LIL_LIGHTDIRECTION_COORDS(7) + LIL_INDLIGHTCOLOR_COORDS(8) + LIL_VERTEXLIGHT_FOG_COORDS(9) + #if defined(LIL_V2F_SHADOW) + LIL_SHADOW_COORDS(10) + #endif + LIL_CUSTOM_V2F_MEMBER(11,12,13,14,15,16,17,18) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input LIL_VFACE(facing)) : SV_Target +{ + //------------------------------------------------------------------------------------------------------------------------------ + // Initialize + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + LIL_GET_HDRPDATA(input,fd); + #if defined(LIL_V2F_SHADOW) || defined(LIL_PASS_FORWARDADD) + LIL_LIGHT_ATTENUATION(fd.attenuation, input); + #endif + LIL_GET_LIGHTING_DATA(input,fd); + + //------------------------------------------------------------------------------------------------------------------------------ + // UDIM Discard + #if defined(LIL_FEATURE_UDIMDISCARD) + OVERRIDE_UDIMDISCARD + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // View Direction + #if defined(LIL_V2F_POSITION_WS) + LIL_GET_POSITION_WS_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) + LIL_GET_TBN_DATA(input,fd); + #endif + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) && defined(LIL_V2F_POSITION_WS) + LIL_GET_PARALLAX_DATA(input,fd); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Apply Matelial & Lighting + #if defined(LIL_OUTLINE) + //------------------------------------------------------------------------------------------------------------------------------ + // UV + BEFORE_ANIMATE_OUTLINE_UV + OVERRIDE_ANIMATE_OUTLINE_UV + BEFORE_CALC_DDX_DDY + OVERRIDE_CALC_DDX_DDY + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + BEFORE_OUTLINE_COLOR + OVERRIDE_OUTLINE_COLOR + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha Mask + BEFORE_ALPHAMASK + #if defined(LIL_FEATURE_ALPHAMASK) && LIL_RENDER != 0 + OVERRIDE_ALPHAMASK + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Dissolve + BEFORE_DISSOLVE + #if defined(LIL_FEATURE_DISSOLVE) && LIL_RENDER != 0 + float dissolveAlpha = 0.0; + if (fd.dissolveActive) + { + float priorAlpha = fd.col.a; + fd.col.a = 1.0f; + OVERRIDE_DISSOLVE + if (fd.dissolveInvert) + { + fd.col.a = 1.0f - fd.col.a; + } + + fd.col.a *= priorAlpha; + } + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Dither + BEFORE_DITHER + #if defined(LIL_FEATURE_DITHER) && LIL_RENDER == 1 + OVERRIDE_DITHER + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha + #if LIL_RENDER == 0 + // Opaque + fd.col.a = 1.0; + #elif LIL_RENDER == 1 + // Cutout + fd.col.a = saturate((fd.col.a - _Cutoff) / max(fwidth(fd.col.a), 0.0001) + 0.5); + if(fd.col.a == 0) discard; + #elif LIL_RENDER == 2 && !defined(LIL_REFRACTION) + // Transparent + clip(fd.col.a - _Cutoff); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Depth Fade + BEFORE_DEPTH_FADE + #if defined(LIL_FEATURE_DEPTH_FADE) && LIL_RENDER == 2 && !defined(LIL_REFRACTION) + OVERRIDE_DEPTH_FADE + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + fd.albedo = fd.col.rgb; + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + #if defined(LIL_PASS_FORWARDADD) + fd.col.rgb = fd.col.rgb * fd.lightColor * _OutlineEnableLighting; + #else + fd.col.rgb = lerp(fd.col.rgb, fd.col.rgb * min(fd.lightColor + fd.addLightColor, _LightMaxLimit), _OutlineEnableLighting); + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Premultiply + LIL_PREMULTIPLY + #else + //------------------------------------------------------------------------------------------------------------------------------ + // UV + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + BEFORE_CALC_DDX_DDY + OVERRIDE_CALC_DDX_DDY + + //------------------------------------------------------------------------------------------------------------------------------ + // Parallax + BEFORE_PARALLAX + #if defined(LIL_FEATURE_PARALLAX) + OVERRIDE_PARALLAX + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Main Color + BEFORE_MAIN + OVERRIDE_MAIN + + //------------------------------------------------------------------------------------------------------------------------------ + // Normal + #if defined(LIL_V2F_NORMAL_WS) + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + float3 normalmap = float3(0.0,0.0,1.0); + + // 1st + BEFORE_NORMAL_1ST + #if defined(LIL_FEATURE_NORMAL_1ST) + OVERRIDE_NORMAL_1ST + #endif + + // 2nd + BEFORE_NORMAL_2ND + #if defined(LIL_FEATURE_NORMAL_2ND) + OVERRIDE_NORMAL_2ND + #endif + + fd.N = normalize(mul(normalmap, fd.TBN)); + fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N; + #else + fd.N = normalize(input.normalWS); + fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N; + #endif + fd.ln = dot(fd.L, fd.N); + #if defined(LIL_V2F_POSITION_WS) + fd.nv = saturate(dot(fd.N, fd.V)); + fd.nvabs = abs(dot(fd.N, fd.V)); + fd.uvRim = float2(fd.nvabs,fd.nvabs); + #endif + fd.origN = normalize(input.normalWS); + fd.uvMat = mul(fd.cameraMatrix, fd.N).xy * 0.5 + 0.5; + #endif + fd.reflectionN = fd.N; + fd.matcapN = fd.N; + fd.matcap2ndN = fd.N; + + //------------------------------------------------------------------------------------------------------------------------------ + // AudioLink + BEFORE_AUDIOLINK + #if defined(LIL_FEATURE_AUDIOLINK) + OVERRIDE_AUDIOLINK + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Layer Color + #if defined(LIL_V2F_TANGENT_WS) + fd.isRightHand = input.tangentWS.w > 0.0; + #endif + // 2nd + BEFORE_MAIN2ND + #if defined(LIL_FEATURE_MAIN2ND) + float main2ndDissolveAlpha = 0.0; + float4 color2nd = 1.0; + OVERRIDE_MAIN2ND + #endif + + // 3rd + BEFORE_MAIN3RD + #if defined(LIL_FEATURE_MAIN3RD) + float main3rdDissolveAlpha = 0.0; + float4 color3rd = 1.0; + OVERRIDE_MAIN3RD + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha Mask + BEFORE_ALPHAMASK + #if defined(LIL_FEATURE_ALPHAMASK) && LIL_RENDER != 0 + OVERRIDE_ALPHAMASK + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Dissolve + BEFORE_DISSOLVE + #if defined(LIL_FEATURE_DISSOLVE) && LIL_RENDER != 0 + float dissolveAlpha = 0.0; + if (fd.dissolveActive) + { + float priorAlpha = fd.col.a; + fd.col.a = 1.0f; + OVERRIDE_DISSOLVE + if (fd.dissolveInvert) + { + fd.col.a = 1.0f - fd.col.a; + } + + fd.col.a *= priorAlpha; + } + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Dither + BEFORE_DITHER + #if defined(LIL_FEATURE_DITHER) && LIL_RENDER == 1 + OVERRIDE_DITHER + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Alpha + #if LIL_RENDER == 0 + // Opaque + fd.col.a = 1.0; + #elif LIL_RENDER == 1 + // Cutout + #if defined(LIL_FEATURE_DITHER) + if(!_UseDither) + #endif + fd.col.a = saturate((fd.col.a - _Cutoff) / max(fwidth(fd.col.a), 0.0001) + 0.5); + if(fd.col.a == 0) discard; + #elif LIL_RENDER == 2 && !defined(LIL_REFRACTION) + // Transparent + #if defined(LIL_TRANSPARENT_PRE) + fd.col *= _PreColor; + clip(fd.col.a - _PreCutoff); + if(_PreOutType) return _PreOutType == 2 ? _PreColor : fd.col; + #else + clip(fd.col.a - _Cutoff); + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Depth Fade + BEFORE_DEPTH_FADE + #if defined(LIL_FEATURE_DEPTH_FADE) && LIL_RENDER == 2 && !defined(LIL_REFRACTION) + OVERRIDE_DEPTH_FADE + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Fur AO + #if defined(LIL_FUR) && LIL_RENDER == 1 + #if defined(LIL_FEATURE_FurMask) + float furMask = LIL_SAMPLE_2D(_FurMask, sampler_MainTex, fd.uvMain).r; + float furAO = _FurAO * furMask; + #else + float furAO = _FurAO; + #endif + fd.col.rgb *= 1.0-furAO; + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Anisotropy + BEFORE_ANISOTROPY + #if defined(LIL_FEATURE_ANISOTROPY) + OVERRIDE_ANISOTROPY + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Copy + fd.albedo = fd.col.rgb; + + //------------------------------------------------------------------------------------------------------------------------------ + // Lighting + BEFORE_SHADOW + #if !defined(LIL_PASS_FORWARDADD) + #if defined(LIL_FEATURE_SHADOW) + OVERRIDE_SHADOW + #else + fd.col.rgb *= fd.lightColor; + #endif + + fd.lightColor += fd.addLightColor; + fd.shadowmix += lilLuminance(fd.addLightColor); + fd.col.rgb += fd.albedo * fd.addLightColor; + + fd.lightColor = min(fd.lightColor, _LightMaxLimit); + fd.shadowmix = saturate(fd.shadowmix); + fd.col.rgb = min(fd.col.rgb, fd.albedo * _LightMaxLimit); + + #if defined(LIL_FEATURE_MAIN2ND) + if(_UseMain2ndTex) fd.col.rgb = lilBlendColor(fd.col.rgb, color2nd.rgb, color2nd.a - color2nd.a * _Main2ndEnableLighting, _Main2ndTexBlendMode); + #endif + #if defined(LIL_FEATURE_MAIN3RD) + if(_UseMain3rdTex) fd.col.rgb = lilBlendColor(fd.col.rgb, color3rd.rgb, color3rd.a - color3rd.a * _Main3rdEnableLighting, _Main3rdTexBlendMode); + #endif + #else + #if defined(LIL_FEATURE_SHADOW) && defined(LIL_OPTIMIZE_APPLY_SHADOW_FA) + OVERRIDE_SHADOW + #else + fd.col.rgb *= fd.lightColor; + #endif + + #if defined(LIL_FEATURE_MAIN2ND) + if(_UseMain2ndTex) fd.col.rgb = lerp(fd.col.rgb, 0, color2nd.a - color2nd.a * _Main2ndEnableLighting); + #endif + #if defined(LIL_FEATURE_MAIN3RD) + if(_UseMain3rdTex) fd.col.rgb = lerp(fd.col.rgb, 0, color3rd.a - color3rd.a * _Main3rdEnableLighting); + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim Shade + BEFORE_RIMSHADE + #if defined(LIL_FEATURE_RIMSHADE) + OVERRIDE_RIMSHADE + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Backlight + BEFORE_BACKLIGHT + #if !defined(LIL_PASS_FORWARDADD) + #if defined(LIL_FEATURE_BACKLIGHT) + OVERRIDE_BACKLIGHT + #endif + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Premultiply + LIL_PREMULTIPLY + + //------------------------------------------------------------------------------------------------------------------------------ + // Refraction + BEFORE_REFRACTION + #if defined(LIL_REFRACTION) && !defined(LIL_PASS_FORWARDADD) + #if defined(LIL_REFRACTION_BLUR2) + fd.smoothness = _Smoothness; + #if defined(LIL_FEATURE_SmoothnessTex) + fd.smoothness *= LIL_SAMPLE_2D_ST(_SmoothnessTex, sampler_MainTex, fd.uvMain).r; + #endif + fd.perceptualRoughness = fd.perceptualRoughness - fd.smoothness * fd.perceptualRoughness; + fd.roughness = fd.perceptualRoughness * fd.perceptualRoughness; + #endif + OVERRIDE_REFRACTION + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Reflection + BEFORE_REFLECTION + #if defined(LIL_FEATURE_REFLECTION) + OVERRIDE_REFLECTION + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // MatCap + BEFORE_MATCAP + #if defined(LIL_FEATURE_MATCAP) + OVERRIDE_MATCAP + #endif + + BEFORE_MATCAP_2ND + #if defined(LIL_FEATURE_MATCAP_2ND) + OVERRIDE_MATCAP_2ND + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Rim light + BEFORE_RIMLIGHT + #if defined(LIL_FEATURE_RIMLIGHT) + OVERRIDE_RIMLIGHT + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Glitter + BEFORE_GLITTER + #if defined(LIL_FEATURE_GLITTER) + OVERRIDE_GLITTER + #endif + + #ifndef LIL_PASS_FORWARDADD + //------------------------------------------------------------------------------------------------------------------------------ + // Emission + BEFORE_EMISSION_1ST + #if defined(LIL_FEATURE_EMISSION_1ST) + OVERRIDE_EMISSION_1ST + #endif + + // Emission2nd + BEFORE_EMISSION_2ND + #if defined(LIL_FEATURE_EMISSION_2ND) + OVERRIDE_EMISSION_2ND + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Dissolve + #if defined(LIL_FEATURE_DISSOLVE) && LIL_RENDER != 0 + OVERRIDE_DISSOLVE_ADD + #endif + + #if defined(LIL_FEATURE_LAYER_DISSOLVE) + #if defined(LIL_FEATURE_MAIN2ND) + fd.emissionColor += _Main2ndDissolveColor.rgb * main2ndDissolveAlpha; + #endif + #if defined(LIL_FEATURE_MAIN3RD) + fd.emissionColor += _Main3rdDissolveColor.rgb * main3rdDissolveAlpha; + #endif + #endif + + BEFORE_BLEND_EMISSION + OVERRIDE_BLEND_EMISSION + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Backface Color + fd.col.rgb = (fd.facing < 0.0) ? lerp(fd.col.rgb, _BackfaceColor.rgb * fd.lightColor, _BackfaceColor.a) : fd.col.rgb; + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Distance Fade + BEFORE_DISTANCE_FADE + #if defined(LIL_FEATURE_DISTANCE_FADE) + OVERRIDE_DISTANCE_FADE + #endif + + //------------------------------------------------------------------------------------------------------------------------------ + // Fix Color + LIL_HDRP_DEEXPOSURE(fd.col); + + //------------------------------------------------------------------------------------------------------------------------------ + // Fog + BEFORE_FOG + OVERRIDE_FOG + + BEFORE_OUTPUT + OVERRIDE_OUTPUT +} + +#if defined(LIL_TESSELLATION) + #include "lil_tessellation.hlsl" +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl.meta new file mode 100644 index 00000000..121be5ee --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5f89df7ffc356d640a8b6062efc51574 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl new file mode 100644 index 00000000..82b0f053 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl @@ -0,0 +1,67 @@ + +#ifndef LIL_PASS_FORWARD_REFLACTION_BLUR_INCLUDED +#define LIL_PASS_FORWARD_REFLACTION_BLUR_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#define LIL_V2F_POSITION_CS +#define LIL_V2F_TEXCOORD0 + +struct v2f +{ + float4 positionCS : SV_POSITION; + float2 uv0 : TEXCOORD0; + LIL_CUSTOM_V2F_MEMBER(1,2,3,4,5,6,7,8) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input LIL_VFACE(facing)) : SV_Target +{ + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + float3 refractCol = 0; + float sum = 0; + fd.smoothness = _Smoothness; + #if defined(LIL_FEATURE_SmoothnessTex) + fd.smoothness *= LIL_SAMPLE_2D_ST(_SmoothnessTex, lil_sampler_linear_repeat, fd.uvMain).r; + #endif + float perceptualRoughness = 1.0 - fd.smoothness; + float roughness = perceptualRoughness * perceptualRoughness; + #if !defined(LIL_LWTEX) + float2 bgRes = lilGetWidthAndHeight(_lilBackgroundTexture); + float aspect = bgRes.y / bgRes.x; + #else + float aspect = _lilBackgroundTexture_TexelSize.x * _lilBackgroundTexture_TexelSize.w; + #endif + float blurOffset = perceptualRoughness / sqrt(fd.positionSS.w) * aspect * (0.03 / LIL_REFRACTION_SAMPNUM) * LIL_MATRIX_P._m11; + for(int j = -LIL_REFRACTION_SAMPNUM; j <= LIL_REFRACTION_SAMPNUM; j++) + { + refractCol += LIL_GET_BG_TEX(fd.uvScn + float2(j*blurOffset,0), 0).rgb * LIL_REFRACTION_GAUSDIST(j); + sum += LIL_REFRACTION_GAUSDIST(j); + } + refractCol /= sum; + return float4(refractCol,1.0); +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl.meta new file mode 100644 index 00000000..d706ec08 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: da2750caf3fa4744e84f953030e161d5 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl new file mode 100644 index 00000000..20d2c92d --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl @@ -0,0 +1,104 @@ +#ifndef LIL_PASS_META_INCLUDED +#define LIL_PASS_META_INCLUDED + +#define LIL_WITHOUT_ANIMATION +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +#if defined(LIL_HDRP) + CBUFFER_START(UnityMetaPass) + bool4 unity_MetaVertexControl; + bool4 unity_MetaFragmentControl; + int unity_VisualizationMode; + CBUFFER_END + + float unity_OneOverOutputBoost; + float unity_MaxOutputValue; + float unity_UseLinearSpace; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#define LIL_V2F_POSITION_CS +#define LIL_V2F_VIZUV +#define LIL_V2F_LIGHTCOORD +#define LIL_V2F_PACKED_TEXCOORD01 +#define LIL_V2F_PACKED_TEXCOORD23 + +struct v2f +{ + float4 positionCS : SV_POSITION; + float4 uv01 : TEXCOORD0; + float4 uv23 : TEXCOORD1; + #if defined(EDITOR_VISUALIZATION) && !defined(LIL_HDRP) + float2 vizUV : TEXCOORD2; + float4 lightCoord : TEXCOORD3; + #endif + LIL_CUSTOM_V2F_MEMBER(4,5,6,7,8,9,10,11) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input) : SV_Target +{ + float facing = 1.0; + //------------------------------------------------------------------------------------------------------------------------------ + // Initialize + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + + BEFORE_MAIN + OVERRIDE_MAIN + fd.albedo = fd.col.rgb; + fd.col.rgb = 0.0; + #if defined(LIL_LITE) + fd.triMask = LIL_SAMPLE_2D(_TriMask, sampler_MainTex, fd.uvMain); + #endif + + BEFORE_EMISSION_1ST + #if defined(LIL_FEATURE_EMISSION_1ST) || defined(LIL_LITE) + OVERRIDE_EMISSION_1ST + #endif + #if !defined(LIL_LITE) + BEFORE_EMISSION_1ST + #if defined(LIL_FEATURE_EMISSION_2ND) + OVERRIDE_EMISSION_2ND + #endif + #endif + BEFORE_BLEND_EMISSION + OVERRIDE_BLEND_EMISSION + + #if defined(LIL_HDRP) + if(!unity_MetaFragmentControl.y) fd.col.rgb = clamp(pow(abs(fd.albedo), saturate(unity_OneOverOutputBoost)), 0, unity_MaxOutputValue); + return fd.col; + #else + MetaInput metaInput; + LIL_INITIALIZE_STRUCT(MetaInput, metaInput); + metaInput.Albedo = abs(fd.albedo); + metaInput.Emission = fd.col.rgb; + #ifdef EDITOR_VISUALIZATION + metaInput.VizUV = input.vizUV; + metaInput.LightCoord = input.lightCoord; + #endif + + return MetaFragment(metaInput); + #endif +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl.meta new file mode 100644 index 00000000..875a3265 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_meta.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7a04cfa6852c13e4ebe940703cada42e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl new file mode 100644 index 00000000..878fc4a3 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl @@ -0,0 +1,177 @@ +#ifndef LIL_PASS_MOTIONVECTOR_INCLUDED +#define LIL_PASS_MOTIONVECTOR_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#define LIL_V2F_POSITION_CS +#define LIL_V2F_PREV_POSITION_CS +#if defined(LIL_URP) && LIL_SRP_VERSION_GREATER_EQUAL(16, 0) + #define LIL_V2F_POSITION_CS_NO_JITTER +#endif +#if defined(LIL_V2F_FORCE_TEXCOORD0) || (LIL_RENDER > 0) + #if defined(LIL_FUR) + #define LIL_V2F_TEXCOORD0 + #else + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #endif +#endif +#if defined(LIL_V2F_FORCE_POSITION_OS) || ((LIL_RENDER > 0) && !defined(LIL_LITE) && defined(LIL_FEATURE_DISSOLVE)) + #define LIL_V2F_POSITION_OS +#endif +#if defined(LIL_V2F_FORCE_POSITION_WS) || (LIL_RENDER > 0) && defined(LIL_FEATURE_DISTANCE_FADE) + #define LIL_V2F_POSITION_WS +#endif +#if defined(LIL_V2F_FORCE_NORMAL) || defined(WRITE_NORMAL_BUFFER) + #define LIL_V2F_NORMAL_WS +#endif +#if defined(LIL_FUR) + #define LIL_V2F_FURLAYER +#endif + +struct v2f +{ + float4 positionCS : SV_POSITION; + float4 previousPositionCS : TEXCOORD0; + #if defined(LIL_V2F_POSITION_CS_NO_JITTER) + float4 positionCSNoJitter : POSITION_CS_NO_JITTER; + #endif + #if defined(LIL_V2F_TEXCOORD0) + float2 uv0 : TEXCOORD1; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD01) + float4 uv01 : TEXCOORD1; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD23) + float4 uv23 : TEXCOORD2; + #endif + #if defined(LIL_V2F_POSITION_OS) + float4 positionOSdissolve : TEXCOORD3; + #endif + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD4; + #endif + #if defined(LIL_V2F_NORMAL_WS) + float3 normalWS : TEXCOORD5; + #endif + #if defined(LIL_FUR) + float furLayer : TEXCOORD6; + #endif + LIL_CUSTOM_V2F_MEMBER(9,10,11,12,13,14,15,16) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +#if defined(LIL_FUR) + #define LIL_V2G_TEXCOORD0 + #define LIL_V2G_POSITION_WS + #if defined(LIL_V2G_FORCE_NORMAL_WS) || defined(WRITE_NORMAL_BUFFER) + #define LIL_V2G_NORMAL_WS + #endif + #define LIL_V2G_FURVECTOR + #define LIL_V2G_VERTEXID + #define LIL_V2G_PREV_POSITION_WS + + struct v2g + { + float3 positionWS : TEXCOORD0; + float2 uv0 : TEXCOORD1; + float3 furVector : TEXCOORD2; + uint vertexID : TEXCOORD3; + #if defined(LIL_V2G_NORMAL_WS) + float3 normalWS : TEXCOORD4; + #endif + float3 previousPositionWS : TEXCOORD5; + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO + }; +#elif defined(LIL_ONEPASS_OUTLINE) + struct v2g + { + v2f base; + float4 positionCSOL : TEXCOORD7; + float4 previousPositionCSOL : TEXCOORD8; + }; +#endif + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#if defined(LIL_FUR) + #include "lil_common_vert_fur.hlsl" +#else + #include "lil_common_vert.hlsl" +#endif +#include "lil_common_frag.hlsl" + +#if defined(WRITE_MSAA_DEPTH) +#define SV_TARGET_NORMAL SV_Target2 +#else +#define SV_TARGET_NORMAL SV_Target1 +#endif + +void frag(v2f input + LIL_VFACE(facing) + #ifdef WRITE_MSAA_DEPTH + , out float4 depthColor : SV_Target0 + , out float4 outMotionVector : SV_Target1 + #else + , out float4 outMotionVector : SV_Target0 + #endif + + #ifdef WRITE_NORMAL_BUFFER + , out float4 outNormalBuffer : SV_TARGET_NORMAL + #endif +) +{ + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + + #include "lil_common_frag_alpha.hlsl" + + #if defined(LIL_V2F_POSITION_CS_NO_JITTER) + float2 motionVector = lilCalculateMotionVector(input.positionCSNoJitter, input.previousPositionCS); + #else + float2 motionVector = lilCalculateMotionVector(input.positionCS, input.previousPositionCS); + #endif + outMotionVector = float4(motionVector, 0.0, 0.0); + + #ifdef WRITE_MSAA_DEPTH + depthColor = fd.positionCS.z; + #ifdef _ALPHATOMASK_ON + #if LIL_RENDER > 0 + depthColor.a = saturate((fd.col.a - _Cutoff) / max(fwidth(fd.col.a), 0.0001) + 0.5); + #else + depthColor.a = 1.0; + #endif + #endif + #endif + + #if defined(WRITE_NORMAL_BUFFER) + fd.N = normalize(input.normalWS); + fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N; + + const float seamThreshold = 1.0 / 1024.0; + fd.N.z = CopySign(max(seamThreshold, abs(fd.N.z)), fd.N.z); + float2 octNormalWS = PackNormalOctQuadEncode(fd.N); + float3 packNormalWS = PackFloat2To888(saturate(octNormalWS * 0.5 + 0.5)); + outNormalBuffer = float4(packNormalWS, 1.0); + #endif +} + +#if defined(LIL_TESSELLATION) + #include "lil_tessellation.hlsl" +#endif + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl.meta new file mode 100644 index 00000000..e764c006 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_motionvectors.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ab6e6b77aa02ecf47af7a84557fdab63 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl new file mode 100644 index 00000000..e1c55c4c --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl @@ -0,0 +1,72 @@ +#ifndef LIL_PASS_SHADOWCASTER_INCLUDED +#define LIL_PASS_SHADOWCASTER_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#if defined(LIL_V2F_FORCE_TEXCOORD0) || (LIL_RENDER > 0) || defined(LIL_FEATURE_UDIMDISCARD) + #if defined(LIL_FUR) + #define LIL_V2F_TEXCOORD0 + #else + #define LIL_V2F_PACKED_TEXCOORD01 + #define LIL_V2F_PACKED_TEXCOORD23 + #endif +#endif +#if defined(LIL_V2F_FORCE_POSITION_OS) || ((LIL_RENDER > 0) && !defined(LIL_LITE) && defined(LIL_FEATURE_DISSOLVE)) + #define LIL_V2F_POSITION_OS +#endif +#if defined(LIL_V2F_FORCE_POSITION_WS) || (LIL_RENDER > 0) && defined(LIL_FEATURE_DISTANCE_FADE) + #define LIL_V2F_POSITION_WS +#endif +#define LIL_V2F_SHADOW_CASTER + +struct v2f +{ + LIL_V2F_SHADOW_CASTER_OUTPUT + #if defined(LIL_V2F_TEXCOORD0) + float2 uv0 : TEXCOORD1; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD01) + float4 uv01 : TEXCOORD1; + #endif + #if defined(LIL_V2F_PACKED_TEXCOORD23) + float4 uv23 : TEXCOORD2; + #endif + #if defined(LIL_V2F_POSITION_OS) + float4 positionOSdissolve : TEXCOORD3; + #endif + #if defined(LIL_V2F_POSITION_WS) + float3 positionWS : TEXCOORD4; + #endif + LIL_CUSTOM_V2F_MEMBER(5,6,7,8,9,10,11,12) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input LIL_VFACE(facing)) : SV_Target +{ + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + LIL_COPY_VFACE(fd.facing); + + #include "lil_common_frag_alpha.hlsl" + + LIL_SHADOW_CASTER_FRAGMENT(input); +} + +#endif diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl.meta new file mode 100644 index 00000000..4833b5e8 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_shadowcaster.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b31f555a2a840974585f4d01711f729d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl new file mode 100644 index 00000000..254e54c5 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl @@ -0,0 +1,56 @@ +#ifndef LIL_PASS_UNIVERSAL2D_INCLUDED +#define LIL_PASS_UNIVERSAL2D_INCLUDED + +#include "lil_common.hlsl" +#include "lil_common_appdata.hlsl" + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +#if !defined(LIL_CUSTOM_V2F_MEMBER) + #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) +#endif + +#define LIL_V2F_POSITION_CS +#define LIL_V2F_TEXCOORD0 + +struct v2f +{ + float4 positionCS : SV_POSITION; + float2 uv0 : TEXCOORD0; + LIL_CUSTOM_V2F_MEMBER(1,2,3,4,5,6,7,8) + LIL_VERTEX_INPUT_INSTANCE_ID + LIL_VERTEX_OUTPUT_STEREO +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Shader +#include "lil_common_vert.hlsl" +#include "lil_common_frag.hlsl" + +float4 frag(v2f input) : SV_Target +{ + LIL_SETUP_INSTANCE_ID(input); + LIL_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + lilFragData fd = lilInitFragData(); + + BEFORE_UNPACK_V2F + OVERRIDE_UNPACK_V2F + + BEFORE_ANIMATE_MAIN_UV + OVERRIDE_ANIMATE_MAIN_UV + + BEFORE_MAIN + OVERRIDE_MAIN + #if LIL_RENDER == 1 + #ifdef LIL_LITE + clip(fd.col.a - _Cutoff); + #else + fd.col.a = saturate((fd.col.a - _Cutoff) / max(fwidth(fd.col.a), 0.0001) + 0.5); + #endif + #elif LIL_RENDER == 2 + clip(fd.col.a - _Cutoff); + #endif + return fd.col; +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl.meta new file mode 100644 index 00000000..597a34c1 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pass_universal2d.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2de8785cf10861045b3e7b24db5cc97b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl new file mode 100644 index 00000000..bdf14cfb --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl @@ -0,0 +1,14 @@ +#define LIL_BRP +#include "UnityCG.cginc" +#include "AutoLight.cginc" +#include "Lighting.cginc" +#include "UnityMetaPass.cginc" + +#if defined(UNITY_SHOULD_SAMPLE_SH) + #undef UNITY_SHOULD_SAMPLE_SH + #define UNITY_SHOULD_SAMPLE_SH 1 + #define LIL_FORCED_SH +#endif +#include "openlit_core.hlsl" +#undef UNITY_SHOULD_SAMPLE_SH +#define UNITY_SHOULD_SAMPLE_SH (defined(LIGHTPROBE_SH) && !defined(UNITY_PASS_FORWARDADD) && !defined(UNITY_PASS_PREPASSBASE) && !defined(UNITY_PASS_SHADOWCASTER) && !defined(UNITY_PASS_META)) \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl.meta new file mode 100644 index 00000000..621f03d0 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_brp.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d9658f119fdeefe4dbecc2775e26ffac +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl new file mode 100644 index 00000000..b7509cf1 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl @@ -0,0 +1,31 @@ +#define LIL_HDRP + +#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER +#if !defined(SHADOW_LOW) && !defined(SHADOW_MEDIUM) && !defined(SHADOW_HIGH) + #define SHADOW_LOW +#endif +#if defined(SHADOW_LOW) + #define PUNCTUAL_SHADOW_LOW + #define DIRECTIONAL_SHADOW_LOW +#elif defined(SHADOW_MEDIUM) + #define PUNCTUAL_SHADOW_MEDIUM + #define DIRECTIONAL_SHADOW_MEDIUM +#elif defined(SHADOW_HIGH) + #define PUNCTUAL_SHADOW_HIGH + #define DIRECTIONAL_SHADOW_HIGH +#endif +//#pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH +#define AREA_SHADOW_MEDIUM + +#if defined(LIL_PASS_SHADOWCASTER) && ((LIL_SRP_VERSION_MAJOR < 5) || (LIL_SRP_VERSION_MAJOR <= 5) && (LIL_SRP_VERSION_MINOR <= 10)) + #define USE_LEGACY_UNITY_MATRIX_VARIABLES +#endif + +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialEvaluation.hlsl" \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl.meta new file mode 100644 index 00000000..851a1921 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 572f275e19e0e8b4488be8e64424ee8f +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl new file mode 100644 index 00000000..f65a9744 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl @@ -0,0 +1,6 @@ +#define LIL_LWRP +#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Lighting.hlsl" +#define _MainTex_ST float4(1,1,0,0) +#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/MetaInput.hlsl" +#undef _MainTex_ST \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl.meta new file mode 100644 index 00000000..5e475937 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_lwrp.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9148fca3e71035044a9cfac5009018ca +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl b/Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl new file mode 100644 index 00000000..eb746106 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl @@ -0,0 +1,4 @@ +#define LIL_URP +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl" \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl.meta new file mode 100644 index 00000000..4f3a9dda --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_pipeline_urp.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 92b4b1bf1a11c064087685cbb7ebe082 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl b/Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl new file mode 100644 index 00000000..40a7f941 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl @@ -0,0 +1,309 @@ +#ifndef LIL_REPLACE_KEYWORDS_INCLUDED +#define LIL_REPLACE_KEYWORDS_INCLUDED + +//---------------------------------------------------------------------------------------------------------------------- +// AvatarEncryption +//#define LIL_FEATURE_ENCRYPTION + +//---------------------------------------------------------------------------------------------------------------------- +// Ignore shader setting +#define LIL_IGNORE_SHADERSETTING + +//---------------------------------------------------------------------------------------------------------------------- +// Shader keyword list + +// Built-in keyword Replace +// ------------------------------------ -------------------------------------------------------------------------------- +// UNITY_UI_ALPHACLIP LIL_RENDER 1 +// UNITY_UI_CLIP_RECT LIL_RENDER 2 +// ------------------------------------ -------------------------------------------------------------------------------- +// EFFECT_HUE_VARIATION LIL_FEATURE_MAIN_GRADATION_MAP LIL_FEATURE_MAIN_TONE_CORRECTION +// _COLORADDSUBDIFF_ON LIL_FEATURE_MAIN2ND +// _COLORCOLOR_ON LIL_FEATURE_MAIN3RD +// _SUNDISK_NONE LIL_FEATURE_ANIMATE_DECAL +// GEOM_TYPE_FROND LIL_FEATURE_LAYER_DISSOLVE +// _COLOROVERLAY_ON LIL_FEATURE_ALPHAMASK +// ------------------------------------ -------------------------------------------------------------------------------- +// _REQUIRE_UV2 LIL_FEATURE_SHADOW +// AUTO_KEY_VALUE LIL_FEATURE_RIMSHADE +// ANTI_FLICKER LIL_FEATURE_BACKLIGHT +// _EMISSION LIL_FEATURE_EMISSION_1ST +// GEOM_TYPE_BRANCH LIL_FEATURE_EMISSION_2ND +// _SUNDISK_SIMPLE LIL_FEATURE_EmissionBlendMask LIL_FEATURE_Emission2ndBlendMask +// ------------------------------------ -------------------------------------------------------------------------------- +// _NORMALMAP LIL_FEATURE_NORMAL_1ST +// EFFECT_BUMP LIL_FEATURE_NORMAL_2ND +// SOURCE_GBUFFER LIL_FEATURE_ANISOTROPY +// _GLOSSYREFLECTIONS_OFF LIL_FEATURE_REFLECTION +// _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A LIL_FEATURE_MATCAP +// _SPECULARHIGHLIGHTS_OFF LIL_FEATURE_MATCAP_2ND +// GEOM_TYPE_MESH LIL_FEATURE_MatCapBumpMap LIL_FEATURE_MatCap2ndBumpMap +// _METALLICGLOSSMAP LIL_FEATURE_RIMLIGHT +// GEOM_TYPE_LEAF LIL_FEATURE_RIMLIGHT_DIRECTION +// _SPECGLOSSMAP LIL_FEATURE_GLITTER +// ------------------------------------ -------------------------------------------------------------------------------- +// _PARALLAXMAP LIL_FEATURE_PARALLAX +// PIXELSNAP_ON LIL_FEATURE_POM +// _FADING_ON LIL_FEATURE_DISTANCE_FADE +// _MAPPING_6_FRAMES_LAYOUT LIL_FEATURE_AUDIOLINK +// _SUNDISK_HIGH_QUALITY LIL_FEATURE_AUDIOLINK_LOCAL +// GEOM_TYPE_BRANCH_DETAIL LIL_FEATURE_DISSOLVE +// ETC1_EXTERNAL_ALPHA LIL_FEATURE_DITHER +// ------------------------------------ -------------------------------------------------------------------------------- +// _DETAIL_MULX2 LIL_FEATURE_OUTLINE_TONE_CORRECTION + + +// removed +// BILLBOARD_FACE_CAMERA_POS LIL_FEATURE_CLIPPING_CANCELLER +// ETC1_EXTERNAL_ALPHA LIL_MULTI_OUTLINE + +//---------------------------------------------------------------------------------------------------------------------- +// Replace keyword to transparent mode +#if defined(UNITY_UI_CLIP_RECT) || defined(LIL_REFRACTION) + #define LIL_RENDER 2 +#elif defined(UNITY_UI_ALPHACLIP) || defined(LIL_FUR) + #define LIL_RENDER 1 +#else + #define LIL_RENDER 0 +#endif + +#if defined(UNITY_UI_CLIP_RECT) + #undef UNITY_UI_CLIP_RECT +#endif + +#if defined(UNITY_UI_ALPHACLIP) + #undef UNITY_UI_ALPHACLIP +#endif + +//---------------------------------------------------------------------------------------------------------------------- +// Replace keyword to shader setting +#if defined(EFFECT_HUE_VARIATION) + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #undef EFFECT_HUE_VARIATION +#endif + +#if defined(_COLORADDSUBDIFF_ON) + #define LIL_FEATURE_MAIN2ND + #undef _COLORADDSUBDIFF_ON +#endif + +#if defined(_COLORCOLOR_ON) + #define LIL_FEATURE_MAIN3RD + #undef _COLORCOLOR_ON +#endif + +#if defined(_SUNDISK_NONE) + #define LIL_FEATURE_ANIMATE_DECAL + #undef _SUNDISK_NONE +#endif + +#if defined(GEOM_TYPE_FROND) + #define LIL_FEATURE_LAYER_DISSOLVE + #undef GEOM_TYPE_FROND +#endif + +#if defined(_COLOROVERLAY_ON) + #define LIL_FEATURE_ALPHAMASK + #undef _COLOROVERLAY_ON +#endif + +#if defined(_REQUIRE_UV2) + #define LIL_FEATURE_SHADOW + #undef _REQUIRE_UV2 +#endif + +#if defined(AUTO_KEY_VALUE) + #define LIL_FEATURE_RIMSHADE + #undef AUTO_KEY_VALUE +#endif + +#if defined(ANTI_FLICKER) + #define LIL_FEATURE_BACKLIGHT + #undef ANTI_FLICKER +#endif + +#if defined(_EMISSION) + #define LIL_FEATURE_EMISSION_1ST + #undef _EMISSION +#endif + +#if defined(GEOM_TYPE_BRANCH) + #define LIL_FEATURE_EMISSION_2ND + #undef GEOM_TYPE_BRANCH +#endif + +#if defined(_SUNDISK_SIMPLE) + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_Emission2ndBlendMask + #undef _SUNDISK_SIMPLE +#endif + +#if defined(_NORMALMAP) + #define LIL_FEATURE_NORMAL_1ST + #undef _NORMALMAP +#endif + +#if defined(EFFECT_BUMP) + #define LIL_FEATURE_NORMAL_2ND + #undef EFFECT_BUMP +#endif + +#if defined(SOURCE_GBUFFER) + #define LIL_FEATURE_ANISOTROPY + #undef SOURCE_GBUFFER +#endif + +#if defined(_GLOSSYREFLECTIONS_OFF) + #define LIL_FEATURE_REFLECTION + #undef _GLOSSYREFLECTIONS_OFF +#endif + +#if defined(_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A) + #define LIL_FEATURE_MATCAP + #undef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A +#endif + +#if defined(_SPECULARHIGHLIGHTS_OFF) + #define LIL_FEATURE_MATCAP_2ND + #undef _SPECULARHIGHLIGHTS_OFF +#endif + +#if defined(GEOM_TYPE_MESH) + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndBumpMap + #undef GEOM_TYPE_MESH +#endif + +#if defined(_METALLICGLOSSMAP) + #define LIL_FEATURE_RIMLIGHT + #undef _METALLICGLOSSMAP +#endif + +#if defined(GEOM_TYPE_LEAF) + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #undef GEOM_TYPE_LEAF +#endif + +#if defined(_SPECGLOSSMAP) + #define LIL_FEATURE_GLITTER + #undef _SPECGLOSSMAP +#endif + +#if defined(_PARALLAXMAP) + #define LIL_FEATURE_PARALLAX + #undef _PARALLAXMAP +#endif + +#if defined(PIXELSNAP_ON) + #define LIL_FEATURE_POM + #undef PIXELSNAP_ON +#endif + +#if defined(_FADING_ON) + #define LIL_FEATURE_DISTANCE_FADE + #undef _FADING_ON +#endif + +#if defined(_MAPPING_6_FRAMES_LAYOUT) + #define LIL_FEATURE_AUDIOLINK + #undef _MAPPING_6_FRAMES_LAYOUT +#endif + +#if defined(_SUNDISK_HIGH_QUALITY) + #define LIL_FEATURE_AUDIOLINK_LOCAL + #undef _SUNDISK_HIGH_QUALITY +#endif + +#if defined(GEOM_TYPE_BRANCH_DETAIL) + #define LIL_FEATURE_DISSOLVE + #undef GEOM_TYPE_BRANCH_DETAIL +#endif + +#if defined(ETC1_EXTERNAL_ALPHA) + #define LIL_FEATURE_DITHER + #undef ETC1_EXTERNAL_ALPHA +#endif + +#if defined(_DETAIL_MULX2) + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #undef _DETAIL_MULX2 +#endif + +//---------------------------------------------------------------------------------------------------------------------- +// Always defined keywords +#define LIL_FEATURE_ANIMATE_MAIN_UV +#define LIL_FEATURE_DECAL +#define LIL_FEATURE_SHADOW_3RD +#define LIL_FEATURE_SHADOW_LUT +#define LIL_FEATURE_RECEIVE_SHADOW +#define LIL_FEATURE_EMISSION_UV +#define LIL_FEATURE_ANIMATE_EMISSION_UV +#define LIL_FEATURE_EMISSION_MASK_UV +#define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV +#define LIL_FEATURE_EMISSION_GRADATION +#define LIL_FEATURE_AUDIOLINK_VERTEX +#define LIL_FEATURE_CLIPPING_CANCELLER +#define LIL_FEATURE_IDMASK +#define LIL_FEATURE_UDIMDISCARD +#define LIL_FEATURE_ANIMATE_OUTLINE_UV +#define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW +#define LIL_FEATURE_FUR_COLLISION + +#define LIL_FEATURE_MainGradationTex +#define LIL_FEATURE_MainColorAdjustMask +#define LIL_FEATURE_Main2ndTex +#define LIL_FEATURE_Main2ndBlendMask +#define LIL_FEATURE_Main2ndDissolveMask +#define LIL_FEATURE_Main2ndDissolveNoiseMask +#define LIL_FEATURE_Main3rdTex +#define LIL_FEATURE_Main3rdBlendMask +#define LIL_FEATURE_Main3rdDissolveMask +#define LIL_FEATURE_Main3rdDissolveNoiseMask +#define LIL_FEATURE_AlphaMask +#define LIL_FEATURE_BumpMap +#define LIL_FEATURE_Bump2ndMap +#define LIL_FEATURE_Bump2ndScaleMask +#define LIL_FEATURE_AnisotropyTangentMap +#define LIL_FEATURE_AnisotropyScaleMask +#define LIL_FEATURE_AnisotropyShiftNoiseMask +#define LIL_FEATURE_ShadowBorderMask +#define LIL_FEATURE_ShadowBlurMask +#define LIL_FEATURE_ShadowStrengthMask +#define LIL_FEATURE_ShadowColorTex +#define LIL_FEATURE_Shadow2ndColorTex +#define LIL_FEATURE_Shadow3rdColorTex +#define LIL_FEATURE_RimShadeMask +#define LIL_FEATURE_BacklightColorTex +#define LIL_FEATURE_SmoothnessTex +#define LIL_FEATURE_MetallicGlossMap +#define LIL_FEATURE_ReflectionColorTex +#define LIL_FEATURE_ReflectionCubeTex +#define LIL_FEATURE_MatCapTex +#define LIL_FEATURE_MatCapBlendMask +#define LIL_FEATURE_MatCapBumpMap +#define LIL_FEATURE_MatCap2ndTex +#define LIL_FEATURE_MatCap2ndBlendMask +#define LIL_FEATURE_MatCap2ndBumpMap +#define LIL_FEATURE_RimColorTex +#define LIL_FEATURE_GlitterColorTex +#define LIL_FEATURE_GlitterShapeTex +#define LIL_FEATURE_EmissionMap +#define LIL_FEATURE_EmissionBlendMask +#define LIL_FEATURE_EmissionGradTex +#define LIL_FEATURE_Emission2ndMap +#define LIL_FEATURE_Emission2ndBlendMask +#define LIL_FEATURE_Emission2ndGradTex +#define LIL_FEATURE_ParallaxMap +#define LIL_FEATURE_AudioLinkMask +#define LIL_FEATURE_AudioLinkLocalMap +#define LIL_FEATURE_DissolveMask +#define LIL_FEATURE_DissolveNoiseMask +#define LIL_FEATURE_OutlineTex +#define LIL_FEATURE_OutlineWidthMask +#define LIL_FEATURE_OutlineVectorTex +#define LIL_FEATURE_FurNoiseMask +#define LIL_FEATURE_FurMask +#define LIL_FEATURE_FurLengthMask +#define LIL_FEATURE_FurVectorTex +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl.meta new file mode 100644 index 00000000..4970e40b --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_replace_keywords.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f3b11bccdd87a1e448a88b4f49d65653 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl b/Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl new file mode 100644 index 00000000..cfb3b20f --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl @@ -0,0 +1,148 @@ +#ifndef LIL_TESSELLATION_INCLUDED +#define LIL_TESSELLATION_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Tessellation + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +struct lilTessellationFactors { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Vertex Shader +appdataCopy vertTess(appdata input) +{ + return input; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Hull Shader +[domain("tri")] +[partitioning("integer")] +[outputtopology("triangle_cw")] +[patchconstantfunc("hullConst")] +[outputcontrolpoints(3)] +appdataCopy hull(InputPatch input, uint id : SV_OutputControlPointID) +{ + return input[id]; +} + +lilTessellationFactors hullConst(InputPatch input) +{ + lilTessellationFactors output; + LIL_INITIALIZE_STRUCT(lilTessellationFactors, output); + LIL_SETUP_INSTANCE_ID(input[0]); + + if(_Invisible) return output; + + LIL_VERTEX_POSITION_INPUTS(input[0].positionOS, vertexInput_0); + LIL_VERTEX_POSITION_INPUTS(input[1].positionOS, vertexInput_1); + LIL_VERTEX_POSITION_INPUTS(input[2].positionOS, vertexInput_2); + LIL_VERTEX_NORMAL_INPUTS(input[0].normalOS, vertexNormalInput_0); + LIL_VERTEX_NORMAL_INPUTS(input[1].normalOS, vertexNormalInput_1); + LIL_VERTEX_NORMAL_INPUTS(input[2].normalOS, vertexNormalInput_2); + + float4 tessFactor; + tessFactor.x = lilCalcEdgeTessFactor(vertexInput_1.positionWS, vertexInput_2.positionWS, _TessEdge); + tessFactor.y = lilCalcEdgeTessFactor(vertexInput_2.positionWS, vertexInput_0.positionWS, _TessEdge); + tessFactor.z = lilCalcEdgeTessFactor(vertexInput_0.positionWS, vertexInput_1.positionWS, _TessEdge); + tessFactor.xyz = min(tessFactor.xyz, _TessFactorMax); + + // Rim + float3 nv = float3(abs(dot(vertexNormalInput_0.normalWS, normalize(lilViewDirection(lilToAbsolutePositionWS(vertexInput_0.positionWS))))), + abs(dot(vertexNormalInput_1.normalWS, normalize(lilViewDirection(lilToAbsolutePositionWS(vertexInput_1.positionWS))))), + abs(dot(vertexNormalInput_2.normalWS, normalize(lilViewDirection(lilToAbsolutePositionWS(vertexInput_2.positionWS)))))); + nv = saturate(1.0 - float3(nv.y + nv.z, nv.z + nv.x, nv.x + nv.y) * 0.5); + tessFactor.xyz = max(tessFactor.xyz * nv * nv, 1.0); + tessFactor.w = (tessFactor.x+tessFactor.y+tessFactor.z) / 3.0; + + // Cull out of screen + float4 pos[3] = {vertexInput_0.positionCS, vertexInput_1.positionCS, vertexInput_2.positionCS}; + pos[0].xy = pos[0].xy/abs(pos[0].w); + pos[1].xy = pos[1].xy/abs(pos[1].w); + pos[2].xy = pos[2].xy/abs(pos[2].w); + tessFactor = (pos[0].x > 1.01 && pos[1].x > 1.01 && pos[2].x > 1.01) || + (pos[0].x < -1.01 && pos[1].x < -1.01 && pos[2].x < -1.01) || + (pos[0].y > 1.01 && pos[1].y > 1.01 && pos[2].y > 1.01) || + (pos[0].y < -1.01 && pos[1].y < -1.01 && pos[2].y < -1.01) ? 0.0 : tessFactor; + + output.edge[0] = tessFactor.x; + output.edge[1] = tessFactor.y; + output.edge[2] = tessFactor.z; + output.inside = tessFactor.w; + + return output; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Domain Shader +[domain("tri")] +#if defined(LIL_ONEPASS_OUTLINE) +v2g domain(lilTessellationFactors hsConst, const OutputPatch input, float3 bary : SV_DomainLocation) +#else +v2f domain(lilTessellationFactors hsConst, const OutputPatch input, float3 bary : SV_DomainLocation) +#endif +{ + appdata output; + LIL_INITIALIZE_STRUCT(appdata, output); + LIL_TRANSFER_INSTANCE_ID(input[0], output); + + #if defined(LIL_APP_POSITION) + LIL_TRI_INTERPOLATION(input,output,bary,positionOS); + #endif + #if defined(LIL_APP_TEXCOORD0) + LIL_TRI_INTERPOLATION(input,output,bary,uv0); + #endif + #if defined(LIL_APP_TEXCOORD1) + LIL_TRI_INTERPOLATION(input,output,bary,uv1); + #endif + #if defined(LIL_APP_TEXCOORD2) + LIL_TRI_INTERPOLATION(input,output,bary,uv2); + #endif + #if defined(LIL_APP_TEXCOORD3) + LIL_TRI_INTERPOLATION(input,output,bary,uv3); + #endif + #if defined(LIL_APP_TEXCOORD4) + LIL_TRI_INTERPOLATION(input,output,bary,uv4); + #endif + #if defined(LIL_APP_TEXCOORD5) + LIL_TRI_INTERPOLATION(input,output,bary,uv5); + #endif + #if defined(LIL_APP_TEXCOORD6) + LIL_TRI_INTERPOLATION(input,output,bary,uv6); + #endif + #if defined(LIL_APP_TEXCOORD7) + LIL_TRI_INTERPOLATION(input,output,bary,uv7); + #endif + #if defined(LIL_APP_COLOR) + LIL_TRI_INTERPOLATION(input,output,bary,color); + #endif + #if defined(LIL_APP_NORMAL) + LIL_TRI_INTERPOLATION(input,output,bary,normalOS); + #endif + #if defined(LIL_APP_TANGENT) + LIL_TRI_INTERPOLATION(input,output,bary,tangentOS); + #endif + #if defined(LIL_APP_VERTEXID) + output.vertexID = input[0].vertexID; + #endif + #if defined(LIL_APP_PREVPOS) + LIL_TRI_INTERPOLATION(input,output,bary,previousPositionOS); + #endif + #if defined(LIL_APP_PREVEL) + LIL_TRI_INTERPOLATION(input,output,bary,precomputedVelocity); + #endif + + output.normalOS = normalize(output.normalOS); + float3 pt[3]; + for(int i = 0; i < 3; i++) + pt[i] = input[i].normalOS * (dot(input[i].positionOS.xyz, input[i].normalOS) - dot(output.positionOS.xyz, input[i].normalOS) - _TessShrink*0.01); + output.positionOS.xyz += (pt[0] * bary.x + pt[1] * bary.y + pt[2] * bary.z) * _TessStrength; + + return vert(output); +} + +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl.meta new file mode 100644 index 00000000..478205bc --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_tessellation.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b02682b409c0260449b279dc9d35d9c7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl b/Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl new file mode 100644 index 00000000..6daa3618 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------------------------------------------------------ +// AudioLink +#if defined(LIL_MODIFY_PREVPOS) + #define LIL_MODIFY_TARGET input.previousPositionOS +#else + #define LIL_MODIFY_TARGET input.positionOS +#endif + +#if !defined(LIL_LITE) && defined(LIL_FEATURE_AUDIOLINK) && defined(LIL_FEATURE_AUDIOLINK_VERTEX) + if(_UseAudioLink && _AudioLink2Vertex) + { + // UV + float2 audioLinkUV; + if(_AudioLinkVertexUVMode == 0) audioLinkUV.x = _AudioLinkVertexUVParams.g; + if(_AudioLinkVertexUVMode == 1) audioLinkUV.x = distance(LIL_MODIFY_TARGET.xyz, _AudioLinkVertexStart.xyz) * _AudioLinkVertexUVParams.r + _AudioLinkVertexUVParams.g; + if(_AudioLinkVertexUVMode == 2) audioLinkUV.x = lilRotateUV(input.uv0, _AudioLinkVertexUVParams.b).x * _AudioLinkVertexUVParams.r + _AudioLinkVertexUVParams.g; + audioLinkUV.y = _AudioLinkVertexUVParams.a; + + // Mask (R:Delay G:Band B:Strength) + float4 audioLinkMask = 1.0; + #if defined(Use_AudioLinkMask) + if(_AudioLinkVertexUVMode == 3) + { + float2 uvMask = uvMain; + if(_AudioLinkMask_UVMode == 1) uvMask = input.uv1.xy; + if(_AudioLinkMask_UVMode == 2) uvMask = input.uv2.xy; + if(_AudioLinkMask_UVMode == 3) uvMask = input.uv3.xy; + uvMask = lilCalcUV(uvMask, _AudioLinkMask_ST, _AudioLinkMask_ScrollRotate); + audioLinkMask = LIL_SAMPLE_2D_LOD(_AudioLinkMask, lil_sampler_linear_repeat, uvMask, 0); + audioLinkUV = audioLinkMask.rg; + } + #endif + + // Init value + float audioLinkValue = saturate(_AudioLinkDefaultValue.x - saturate(frac(LIL_TIME * _AudioLinkDefaultValue.z - audioLinkUV.x)+_AudioLinkDefaultValue.w) * _AudioLinkDefaultValue.y * _AudioLinkDefaultValue.x); + + // Local + #if defined(LIL_FEATURE_AUDIOLINK_LOCAL) && defined(LIL_FEATURE_AudioLinkLocalMap) + if(_AudioLinkAsLocal) + { + audioLinkUV.x += frac(-LIL_TIME * _AudioLinkLocalMapParams.r / 60 * _AudioLinkLocalMapParams.g) + _AudioLinkLocalMapParams.b; + audioLinkValue = LIL_SAMPLE_2D_LOD(_AudioLinkLocalMap, lil_sampler_linear_repeat, audioLinkUV, 0).r; + } + else + #endif + + // Global + if(lilCheckAudioLink()) + { + // Scaling for _AudioTexture (4/64) + audioLinkUV.y *= 0.0625; + audioLinkValue = LIL_SAMPLE_2D_LOD(_AudioTexture, lil_sampler_linear_clamp, audioLinkUV, 0).r; + audioLinkValue = saturate(audioLinkValue); + } + + // Modify + LIL_MODIFY_TARGET.xyz += (input.normalOS * _AudioLinkVertexStrength.w + _AudioLinkVertexStrength.xyz) * audioLinkValue * audioLinkMask.b; + } +#endif + +#undef LIL_MODIFY_TARGET \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl.meta new file mode 100644 index 00000000..f85abb50 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_vert_audiolink.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c3c0d0056ab91ba4db7516465a6581fe +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl b/Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl new file mode 100644 index 00000000..ef28ecf7 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------------------------------------------------------ +// GTAvaCrypt (https://github.com/rygo6/GTAvaCrypt/blob/master/LICENSE) +#if defined(LIL_MODIFY_PREVPOS) + #define LIL_MODIFY_TARGET input.previousPositionOS +#else + #define LIL_MODIFY_TARGET input.positionOS +#endif + +#if !defined(LIL_LITE) && !defined(LIL_BAKER) && defined(LIL_FEATURE_ENCRYPTION) + #if defined(GTMODELDECODE) + if(!_IgnoreEncryption) LIL_MODIFY_TARGET.xyz = modelDecode(float4(LIL_MODIFY_TARGET.xyz,1), input.normalOS, input.uv6.xy, input.uv7.xy).xyz; + #else + if(!_IgnoreEncryption) + { + float4 keys = floor(_Keys + 0.5); + keys = keys.x == 0 ? float4(0,0,0,0) : floor(keys / 3) * 3 + 1; + + keys.x *= 1; + keys.y *= 2; + keys.z *= 3; + keys.w *= 4; + + LIL_MODIFY_TARGET.xyz -= input.normalOS * input.uv6.x * (sin((keys.z - keys.y) * 2) * cos(keys.w - keys.x)); + LIL_MODIFY_TARGET.xyz -= input.normalOS * input.uv6.y * (sin((keys.w - keys.x) * 3) * cos(keys.z - keys.y)); + LIL_MODIFY_TARGET.xyz -= input.normalOS * input.uv7.x * (sin((keys.x - keys.w) * 4) * cos(keys.y - keys.z)); + LIL_MODIFY_TARGET.xyz -= input.normalOS * input.uv7.y * (sin((keys.y - keys.z) * 5) * cos(keys.x - keys.w)); + } + #endif +#endif + +#undef LIL_MODIFY_TARGET \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl.meta new file mode 100644 index 00000000..d446cd54 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_vert_encryption.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 957b6179a395605459b9e1ef1d0cdc0d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl b/Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl new file mode 100644 index 00000000..7d026918 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------------------------------------------------------ +// Outline +#if defined(LIL_OUTLINE) || defined(LIL_ONEPASS_OUTLINE) + #if defined(LIL_MODIFY_PREVPOS) + #define LIL_MODIFY_TARGET input.previousPositionOS + #else + #define LIL_MODIFY_TARGET input.positionOS + #endif + + #if defined(LIL_PASS_SHADOWCASTER_INCLUDED) + if(LIL_MATRIX_P._m33 == 0.0) + #endif + + #if defined(LIL_LITE) + #if !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !(defined(LIL_URP) && defined(LIL_PASS_DEPTHONLY_INCLUDED)) + lilCalcOutlinePositionLite(LIL_MODIFY_TARGET.xyz, uvMain, input.color, input.normalOS, tbnOS, _OutlineWidth, _OutlineWidthMask, _OutlineVertexR2Width, _OutlineFixWidth, _OutlineZBias LIL_SAMP_IN(lil_sampler_linear_repeat)); + #else + lilCalcOutlinePositionLite(LIL_MODIFY_TARGET.xyz, uvMain, input.color, input.normalOS, tbnOS, _OutlineWidth, _OutlineWidthMask, _OutlineVertexR2Width, _OutlineFixWidth, 0 LIL_SAMP_IN(lil_sampler_linear_repeat)); + #endif + #else + #if !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !(defined(LIL_URP) && defined(LIL_PASS_DEPTHONLY_INCLUDED)) + lilCalcOutlinePosition(LIL_MODIFY_TARGET.xyz, uvs, input.color, input.normalOS, tbnOS, _OutlineWidth, _OutlineWidthMask, _OutlineVertexR2Width, _OutlineFixWidth, _OutlineZBias, _OutlineVectorScale, _OutlineVectorUVMode, _OutlineVectorTex LIL_SAMP_IN(lil_sampler_linear_repeat)); + #else + lilCalcOutlinePosition(LIL_MODIFY_TARGET.xyz, uvs, input.color, input.normalOS, tbnOS, _OutlineWidth, _OutlineWidthMask, _OutlineVertexR2Width, _OutlineFixWidth, 0, _OutlineVectorScale, _OutlineVectorUVMode, _OutlineVectorTex LIL_SAMP_IN(lil_sampler_linear_repeat)); + #endif + #endif + + #undef LIL_MODIFY_TARGET +#endif \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl.meta b/Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl.meta new file mode 100644 index 00000000..7fda857e --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/lil_vert_outline.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 683a6eed396c8044bb0c482c77c997d4 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/Includes/openlit_core.hlsl b/Assets/External/lilToon/Shader/Includes/openlit_core.hlsl new file mode 100644 index 00000000..209c7bfc --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/openlit_core.hlsl @@ -0,0 +1,284 @@ +// OpenLit Library 1.0.2 +// This code is licensed under CC0 1.0 Universal. +// https://creativecommons.org/publicdomain/zero/1.0/ + +#if !defined(OPENLIT_CORE_INCLUDED) +#define OPENLIT_CORE_INCLUDED + +//------------------------------------------------------------------------------------------------------------------------------ +// Macro +#define OPENLIT_LIGHT_COLOR _LightColor0.rgb +#define OPENLIT_LIGHT_DIRECTION _WorldSpaceLightPos0.xyz +#define OPENLIT_MATRIX_M unity_ObjectToWorld +#define OPENLIT_FALLBACK_DIRECTION float4(0.001,0.002,0.001,0) + +//------------------------------------------------------------------------------------------------------------------------------ +// SRGB <-> Linear +float3 OpenLitLinearToSRGB(float3 col) +{ + return LinearToGammaSpace(col); +} + +float3 OpenLitSRGBToLinear(float3 col) +{ + return GammaToLinearSpace(col); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Color +float OpenLitLuminance(float3 rgb) +{ + #if defined(UNITY_COLORSPACE_GAMMA) + return dot(rgb, float3(0.22, 0.707, 0.071)); + #else + return dot(rgb, float3(0.0396819152, 0.458021790, 0.00609653955)); + #endif +} + +float OpenLitGray(float3 rgb) +{ + return dot(rgb, float3(1.0/3.0, 1.0/3.0, 1.0/3.0)); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Structure +struct OpenLitLightDatas +{ + float3 lightDirection; + float3 directLight; + float3 indirectLight; +}; + +//------------------------------------------------------------------------------------------------------------------------------ +// Light Direction +// Use `UnityWorldSpaceLightDir(float3 positionWS)` for ForwardAdd passes +float3 ComputeCustomLightDirection(float4 lightDirectionOverride) +{ + float3 customDir = length(lightDirectionOverride.xyz) * normalize(mul((float3x3)OPENLIT_MATRIX_M, lightDirectionOverride.xyz)); + return lightDirectionOverride.w ? customDir : lightDirectionOverride.xyz; +} + +void ComputeLightDirection(out float3 lightDirection, out float3 lightDirectionForSH9, float4 lightDirectionOverride) +{ + float3 mainDir = OPENLIT_LIGHT_DIRECTION * OpenLitLuminance(OPENLIT_LIGHT_COLOR); + #if !defined(LIGHTMAP_ON) && UNITY_SHOULD_SAMPLE_SH + float3 sh9Dir = unity_SHAr.xyz * 0.333333 + unity_SHAg.xyz * 0.333333 + unity_SHAb.xyz * 0.333333; + float3 sh9DirAbs = float3(sh9Dir.x, abs(sh9Dir.y), sh9Dir.z); + #else + float3 sh9Dir = 0; + float3 sh9DirAbs = 0; + #endif + float3 customDir = ComputeCustomLightDirection(lightDirectionOverride); + + lightDirection = normalize(sh9DirAbs + mainDir + customDir); + lightDirectionForSH9 = sh9Dir + mainDir; + lightDirectionForSH9 = dot(lightDirectionForSH9,lightDirectionForSH9) < 0.000001 ? 0 : normalize(lightDirectionForSH9); +} + +void ComputeLightDirection(out float3 lightDirection, out float3 lightDirectionForSH9) +{ + ComputeLightDirection(lightDirection, lightDirectionForSH9, OPENLIT_FALLBACK_DIRECTION); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// ShadeSH9 +void ShadeSH9ToonDouble(float3 lightDirection, out float3 shMax, out float3 shMin) +{ + #if !defined(LIGHTMAP_ON) && UNITY_SHOULD_SAMPLE_SH + float3 N = lightDirection * 0.666666; + float4 vB = N.xyzz * N.yzzx; + // L0 L2 + float3 res = float3(unity_SHAr.w,unity_SHAg.w,unity_SHAb.w); + res.r += dot(unity_SHBr, vB); + res.g += dot(unity_SHBg, vB); + res.b += dot(unity_SHBb, vB); + res += unity_SHC.rgb * (N.x * N.x - N.y * N.y); + // L1 + float3 l1; + l1.r = dot(unity_SHAr.rgb, N); + l1.g = dot(unity_SHAg.rgb, N); + l1.b = dot(unity_SHAb.rgb, N); + shMax = res + l1; + shMin = res - l1; + #if defined(UNITY_COLORSPACE_GAMMA) + shMax = OpenLitLinearToSRGB(shMax); + shMin = OpenLitLinearToSRGB(shMin); + #endif + #else + shMax = 0.0; + shMin = 0.0; + #endif +} + +void ShadeSH9ToonDouble(out float3 shMax, out float3 shMin) +{ + float3 lightDirection, lightDirectionForSH9; + ComputeLightDirection(lightDirection, lightDirectionForSH9, OPENLIT_FALLBACK_DIRECTION); + ShadeSH9ToonDouble(lightDirectionForSH9, shMax, shMin); +} + +float3 ShadeSH9Toon() +{ + float3 shMax, shMin; + ShadeSH9ToonDouble(shMax, shMin); + return shMax; +} + +float3 ShadeSH9ToonIndirect() +{ + float3 shMax, shMin; + ShadeSH9ToonDouble(shMax, shMin); + return shMin; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Lighting +void ComputeSHLightsAndDirection(out float3 lightDirection, out float3 directLight, out float3 indirectLight, float4 lightDirectionOverride) +{ + float3 lightDirectionForSH9; + ComputeLightDirection(lightDirection, lightDirectionForSH9, lightDirectionOverride); + ShadeSH9ToonDouble(lightDirectionForSH9, directLight, indirectLight); +} + +void ComputeSHLightsAndDirection(out float3 lightDirection, out float3 directLight, out float3 indirectLight) +{ + ComputeSHLightsAndDirection(lightDirection, directLight, indirectLight, OPENLIT_FALLBACK_DIRECTION); +} + +void ComputeLights(out float3 lightDirection, out float3 directLight, out float3 indirectLight, float4 lightDirectionOverride) +{ + ComputeSHLightsAndDirection(lightDirection, directLight, indirectLight, lightDirectionOverride); + directLight += OPENLIT_LIGHT_COLOR; +} + +void ComputeLights(out float3 lightDirection, out float3 directLight, out float3 indirectLight) +{ + ComputeSHLightsAndDirection(lightDirection, directLight, indirectLight); + directLight += OPENLIT_LIGHT_COLOR; +} + +void ComputeLights(out OpenLitLightDatas lightDatas, float4 lightDirectionOverride) +{ + ComputeLights(lightDatas.lightDirection, lightDatas.directLight, lightDatas.indirectLight, lightDirectionOverride); +} + +void ComputeLights(out OpenLitLightDatas lightDatas) +{ + ComputeLights(lightDatas.lightDirection, lightDatas.directLight, lightDatas.indirectLight); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Correct +void CorrectLights(inout OpenLitLightDatas lightDatas, float lightMinLimit, float lightMaxLimit, float monochromeLighting, float asUnlit) +{ + lightDatas.directLight = clamp(lightDatas.directLight, lightMinLimit, lightMaxLimit); + lightDatas.directLight = lerp(lightDatas.directLight, OpenLitGray(lightDatas.directLight), monochromeLighting); + lightDatas.directLight = lerp(lightDatas.directLight, 1.0, asUnlit); + lightDatas.indirectLight = clamp(lightDatas.indirectLight, 0.0, lightMaxLimit); +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Vertex Lighting +float3 ComputeAdditionalLights(float3 positionWS, float3 positionCS) +{ + float4 toLightX = unity_4LightPosX0 - positionWS.x; + float4 toLightY = unity_4LightPosY0 - positionWS.y; + float4 toLightZ = unity_4LightPosZ0 - positionWS.z; + + float4 lengthSq = toLightX * toLightX + 0.000001; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + //float4 atten = 1.0 / (1.0 + lengthSq * unity_4LightAtten0); + float4 atten = saturate(saturate((25.0 - lengthSq * unity_4LightAtten0) * 0.111375) / (0.987725 + lengthSq * unity_4LightAtten0)); + + float3 additionalLightColor; + additionalLightColor = unity_LightColor[0].rgb * atten.x; + additionalLightColor = additionalLightColor + unity_LightColor[1].rgb * atten.y; + additionalLightColor = additionalLightColor + unity_LightColor[2].rgb * atten.z; + additionalLightColor = additionalLightColor + unity_LightColor[3].rgb * atten.w; + + return additionalLightColor; +} + +//------------------------------------------------------------------------------------------------------------------------------ +// Encode and decode +#if !defined(SHADER_API_GLES) +// -1 - 1 +uint EncodeNormalizedFloat3ToUint(float3 vec) +{ + uint valx = abs(vec.x) >= 1 ? 511 : abs(vec.x) * 511; + uint valy = abs(vec.y) >= 1 ? 511 : abs(vec.y) * 511; + uint valz = abs(vec.z) >= 1 ? 511 : abs(vec.z) * 511; + valx = valx & 0x000001ffu; + valy = valy & 0x000001ffu; + valz = valz & 0x000001ffu; + valx += vec.x > 0 ? 0 : 512; + valy += vec.y > 0 ? 0 : 512; + valz += vec.z > 0 ? 0 : 512; + + valy = valy << 10; + valz = valz << 20; + return valx | valy | valz; +} + +float3 DecodeNormalizedFloat3FromUint(uint val) +{ + // 5 math in target 5.0 + uint3 val3 = val >> uint3(0,10,20); + float3 vec = val3 & 0x000001ffu; + vec /= (val3 & 0x00000200u) == 0x00000200u ? -511.0 : 511.0; + return vec; +} + +// 0 - 999 +uint EncodeHDRColorToUint(float3 col) +{ + col = clamp(col, 0, 999); + float maxcol = max(col.r,max(col.g,col.b)); + + float floatDigit = maxcol == 0 ? 0 : log10(maxcol); + uint digit = floatDigit >= 0 ? floatDigit + 1 : 0; + if(digit > 3) digit = 3; + float scale = pow(10,digit); + col /= scale; + + uint R = col.r * 1023; + uint G = col.g * 1023; + uint B = col.b * 1023; + uint M = digit; + R = R & 0x000003ffu; + G = G & 0x000003ffu; + B = B & 0x000003ffu; + + G = G << 10; + B = B << 20; + M = M << 30; + return R | G | B | M; +} + +float3 DecodeHDRColorFromUint(uint val) +{ + // 5 math in target 5.0 + uint4 RGBM = val >> uint4(0,10,20,30); + return float3(RGBM.rgb & 0x000003ffu) / 1023.0 * pow(10,RGBM.a); +} + +void PackLightDatas(out uint3 pack, OpenLitLightDatas lightDatas) +{ + pack = uint3( + EncodeNormalizedFloat3ToUint(lightDatas.lightDirection), + EncodeHDRColorToUint(lightDatas.directLight), + EncodeHDRColorToUint(lightDatas.indirectLight) + ); +} + +void UnpackLightDatas(out OpenLitLightDatas lightDatas, uint3 pack) +{ + lightDatas.lightDirection = DecodeNormalizedFloat3FromUint(pack.x); + lightDatas.directLight = DecodeHDRColorFromUint(pack.y); + lightDatas.indirectLight = DecodeHDRColorFromUint(pack.z); +} +#endif // #if !defined(SHADER_API_GLES) + +#endif // #if !defined(OPENLIT_CORE_INCLUDED) \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/Includes/openlit_core.hlsl.meta b/Assets/External/lilToon/Shader/Includes/openlit_core.hlsl.meta new file mode 100644 index 00000000..f4647ff2 --- /dev/null +++ b/Assets/External/lilToon/Shader/Includes/openlit_core.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ace400995eeef5f40ad13c929ee03b13 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts.shader b/Assets/External/lilToon/Shader/lts.shader new file mode 100644 index 00000000..0fe63a13 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts.shader @@ -0,0 +1,753 @@ +Shader "lilToon" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + UsePass "Hidden/ltspass_opaque/FORWARD" + UsePass "Hidden/ltspass_opaque/SHADOW_CASTER" + UsePass "Hidden/ltspass_opaque/DEPTHONLY" + UsePass "Hidden/ltspass_opaque/DEPTHNORMALS" + UsePass "Hidden/ltspass_opaque/MOTIONVECTORS" + UsePass "Hidden/ltspass_opaque/UNIVERSAL2D" + UsePass "Hidden/ltspass_opaque/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts.shader.meta b/Assets/External/lilToon/Shader/lts.shader.meta new file mode 100644 index 00000000..65337cdb --- /dev/null +++ b/Assets/External/lilToon/Shader/lts.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: df12117ecd77c31469c224178886498e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_cutout.shader b/Assets/External/lilToon/Shader/lts_cutout.shader new file mode 100644 index 00000000..2b5ae5a3 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_cutout.shader @@ -0,0 +1,753 @@ +Shader "Hidden/lilToonCutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/ltspass_cutout/FORWARD" + UsePass "Hidden/ltspass_cutout/SHADOW_CASTER" + UsePass "Hidden/ltspass_cutout/DEPTHONLY" + UsePass "Hidden/ltspass_cutout/DEPTHNORMALS" + UsePass "Hidden/ltspass_cutout/MOTIONVECTORS" + UsePass "Hidden/ltspass_cutout/UNIVERSAL2D" + UsePass "Hidden/ltspass_cutout/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_cutout.shader.meta b/Assets/External/lilToon/Shader/lts_cutout.shader.meta new file mode 100644 index 00000000..224956f0 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_cutout.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85d6126cae43b6847aff4b13f4adb8ec +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_cutout_o.shader b/Assets/External/lilToon/Shader/lts_cutout_o.shader new file mode 100644 index 00000000..b97c4fb4 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_cutout_o.shader @@ -0,0 +1,754 @@ +Shader "Hidden/lilToonCutoutOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/ltspass_cutout/FORWARD" + UsePass "Hidden/ltspass_cutout/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_cutout/SHADOW_CASTER" + UsePass "Hidden/ltspass_cutout/DEPTHONLY" + UsePass "Hidden/ltspass_cutout/DEPTHNORMALS" + UsePass "Hidden/ltspass_cutout/MOTIONVECTORS" + UsePass "Hidden/ltspass_cutout/UNIVERSAL2D" + UsePass "Hidden/ltspass_cutout/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_cutout_o.shader.meta b/Assets/External/lilToon/Shader/lts_cutout_o.shader.meta new file mode 100644 index 00000000..9beab75e --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_cutout_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3b4aa19949601f046a20ca8bdaee929f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_cutout_oo.shader b/Assets/External/lilToon/Shader/lts_cutout_oo.shader new file mode 100644 index 00000000..1df0bf70 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_cutout_oo.shader @@ -0,0 +1,747 @@ +Shader "_lil/[Optional] lilToonOutlineOnlyCutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/ltspass_cutout/FORWARD_OUTLINE" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_cutout_oo.shader.meta b/Assets/External/lilToon/Shader/lts_cutout_oo.shader.meta new file mode 100644 index 00000000..912ad2be --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_cutout_oo.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3b3957e6c393b114bab6f835b4ed8f5d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_fakeshadow.shader b/Assets/External/lilToon/Shader/lts_fakeshadow.shader new file mode 100644 index 00000000..53065d12 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fakeshadow.shader @@ -0,0 +1,481 @@ +Shader "_lil/[Optional] lilToonFakeShadow" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (0.925,0.7,0.74,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilVec3Float] _FakeShadowVector ("sFakeShadowVectors", Vector) = (0,0,0,0.05) + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 51 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 3 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + } + + SubShader + { + Tags {"RenderType" = "Transparent" "Queue" = "AlphaTest+55" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FAKESHADOW + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants VERTEXLIGHT_ON LIGHTPROBE_SH + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fakeshadow.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Transparent" "Queue" = "AlphaTest+55"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FAKESHADOW + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants VERTEXLIGHT_ON LIGHTPROBE_SH + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fakeshadow.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_fakeshadow.shader.meta b/Assets/External/lilToon/Shader/lts_fakeshadow.shader.meta new file mode 100644 index 00000000..8471416e --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fakeshadow.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 00795bf598b44dc4e9bd363348e77085 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_fur.shader b/Assets/External/lilToon/Shader/lts_fur.shader new file mode 100644 index 00000000..c678cfc0 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fur.shader @@ -0,0 +1,1663 @@ +Shader "Hidden/lilToonFur" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "Transparent" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_fur.shader.meta b/Assets/External/lilToon/Shader/lts_fur.shader.meta new file mode 100644 index 00000000..f08f3b6b --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fur.shader.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 55706696b2bdb5d4d8541b89e17085c8 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _ShadowStrengthMask: {instanceID: 0} + - _ShadowColorTex: {instanceID: 0} + - _ShadowBorderMask: {instanceID: 0} + - _ShadowBlurMask: {instanceID: 0} + - _Shadow2ndColorTex: {instanceID: 0} + - _FurNoiseMask: {fileID: 2800000, guid: 8a7dbcb2f4a32ec4297486403aee5f74, type: 3} + - _FurMask: {instanceID: 0} + - _FurLengthMask: {instanceID: 0} + - _FurVectorTex: {instanceID: 0} + - _BaseMap: {instanceID: 0} + - _BaseColorMap: {instanceID: 0} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_fur_cutout.shader b/Assets/External/lilToon/Shader/lts_fur_cutout.shader new file mode 100644 index 00000000..b94b6703 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fur_cutout.shader @@ -0,0 +1,1663 @@ +Shader "Hidden/lilToonFurCutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 1 + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_fur_cutout.shader.meta b/Assets/External/lilToon/Shader/lts_fur_cutout.shader.meta new file mode 100644 index 00000000..777fc968 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fur_cutout.shader.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 544c75f56e9af8048b29a6ace5f52091 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _ShadowStrengthMask: {instanceID: 0} + - _ShadowColorTex: {instanceID: 0} + - _ShadowBorderMask: {instanceID: 0} + - _ShadowBlurMask: {instanceID: 0} + - _Shadow2ndColorTex: {instanceID: 0} + - _FurNoiseMask: {fileID: 2800000, guid: 8a7dbcb2f4a32ec4297486403aee5f74, type: 3} + - _FurMask: {instanceID: 0} + - _FurLengthMask: {instanceID: 0} + - _FurVectorTex: {instanceID: 0} + - _BaseMap: {instanceID: 0} + - _BaseColorMap: {instanceID: 0} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_fur_two.shader b/Assets/External/lilToon/Shader/lts_fur_two.shader new file mode 100644 index 00000000..8c2cc853 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fur_two.shader @@ -0,0 +1,1796 @@ +Shader "Hidden/lilToonFurTwoPass" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "Transparent" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Fur Pre + Pass + { + Name "FORWARD_FUR_PRE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite On + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp Add, Add + Blend One Zero, One OneMinusSrcAlpha + AlphaToMask On + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_FUR_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Fur Pre + Pass + { + Name "FORWARD_FUR_PRE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite On + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp Add, Add + Blend One Zero, One OneMinusSrcAlpha + AlphaToMask On + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_FUR_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_fur_two.shader.meta b/Assets/External/lilToon/Shader/lts_fur_two.shader.meta new file mode 100644 index 00000000..27c1b04e --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_fur_two.shader.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 54bc8b41278802d4a81b27fe402994e2 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _ShadowStrengthMask: {instanceID: 0} + - _ShadowColorTex: {instanceID: 0} + - _ShadowBorderMask: {instanceID: 0} + - _ShadowBlurMask: {instanceID: 0} + - _Shadow2ndColorTex: {instanceID: 0} + - _FurNoiseMask: {fileID: 2800000, guid: 8a7dbcb2f4a32ec4297486403aee5f74, type: 3} + - _FurMask: {instanceID: 0} + - _FurLengthMask: {instanceID: 0} + - _FurVectorTex: {instanceID: 0} + - _BaseMap: {instanceID: 0} + - _BaseColorMap: {instanceID: 0} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_furonly.shader b/Assets/External/lilToon/Shader/lts_furonly.shader new file mode 100644 index 00000000..79375079 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_furonly.shader @@ -0,0 +1,768 @@ +Shader "_lil/[Optional] lilToonFurOnlyTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + UsePass "Hidden/lilToonFur/FORWARD_FUR" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_furonly.shader.meta b/Assets/External/lilToon/Shader/lts_furonly.shader.meta new file mode 100644 index 00000000..70431e92 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_furonly.shader.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 33aad051c4a3a844a8f9330addb86a97 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _ShadowStrengthMask: {instanceID: 0} + - _ShadowColorTex: {instanceID: 0} + - _ShadowBorderMask: {instanceID: 0} + - _ShadowBlurMask: {instanceID: 0} + - _Shadow2ndColorTex: {instanceID: 0} + - _FurNoiseMask: {fileID: 2800000, guid: 8a7dbcb2f4a32ec4297486403aee5f74, type: 3} + - _FurMask: {instanceID: 0} + - _FurLengthMask: {instanceID: 0} + - _FurVectorTex: {instanceID: 0} + - _BaseMap: {instanceID: 0} + - _BaseColorMap: {instanceID: 0} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_furonly_cutout.shader b/Assets/External/lilToon/Shader/lts_furonly_cutout.shader new file mode 100644 index 00000000..26780a3e --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_furonly_cutout.shader @@ -0,0 +1,768 @@ +Shader "_lil/[Optional] lilToonFurOnlyCutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/lilToonFurCutout/FORWARD_FUR" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_furonly_cutout.shader.meta b/Assets/External/lilToon/Shader/lts_furonly_cutout.shader.meta new file mode 100644 index 00000000..df79810d --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_furonly_cutout.shader.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7ec9f85eb7ee04943adfe19c2ba5901f +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _ShadowStrengthMask: {instanceID: 0} + - _ShadowColorTex: {instanceID: 0} + - _ShadowBorderMask: {instanceID: 0} + - _ShadowBlurMask: {instanceID: 0} + - _Shadow2ndColorTex: {instanceID: 0} + - _FurNoiseMask: {fileID: 2800000, guid: 8a7dbcb2f4a32ec4297486403aee5f74, type: 3} + - _FurMask: {instanceID: 0} + - _FurLengthMask: {instanceID: 0} + - _FurVectorTex: {instanceID: 0} + - _BaseMap: {instanceID: 0} + - _BaseColorMap: {instanceID: 0} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_furonly_two.shader b/Assets/External/lilToon/Shader/lts_furonly_two.shader new file mode 100644 index 00000000..5e5b2092 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_furonly_two.shader @@ -0,0 +1,769 @@ +Shader "_lil/[Optional] lilToonFurOnlyTwoPass" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "Transparent"} + UsePass "Hidden/lilToonFurTwoPass/FORWARD_FUR_PRE" + UsePass "Hidden/lilToonFurTwoPass/FORWARD_FUR" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_furonly_two.shader.meta b/Assets/External/lilToon/Shader/lts_furonly_two.shader.meta new file mode 100644 index 00000000..aeaed31d --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_furonly_two.shader.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f8d9dfac6dbfaaf4c9c3aaf4bd8c955f +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _ShadowStrengthMask: {instanceID: 0} + - _ShadowColorTex: {instanceID: 0} + - _ShadowBorderMask: {instanceID: 0} + - _ShadowBlurMask: {instanceID: 0} + - _Shadow2ndColorTex: {instanceID: 0} + - _FurNoiseMask: {fileID: 2800000, guid: 8a7dbcb2f4a32ec4297486403aee5f74, type: 3} + - _FurMask: {instanceID: 0} + - _FurLengthMask: {instanceID: 0} + - _FurVectorTex: {instanceID: 0} + - _BaseMap: {instanceID: 0} + - _BaseColorMap: {instanceID: 0} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_gem.shader b/Assets/External/lilToon/Shader/lts_gem.shader new file mode 100644 index 00000000..d8448552 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_gem.shader @@ -0,0 +1,1580 @@ +Shader "Hidden/lilToonGem" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.5 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + //Gem + _GemChromaticAberration ("sChromaticAberration", Range(0, 1)) = 0.02 + _GemEnvContrast ("sContrast", Float) = 2.0 + [lilHDR] _GemEnvColor ("sEnvironmentColor", Color) = (1,1,1,1) + _GemParticleLoop ("sParticleLoop", Float) = 8 + [lilHDR] _GemParticleColor ("sColor", Color) = (4,4,4,1) + _GemVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_gem.shader.meta b/Assets/External/lilToon/Shader/lts_gem.shader.meta new file mode 100644 index 00000000..b094e73c --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_gem.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a8d94439709469942bc7dcc9156ba110 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_o.shader b/Assets/External/lilToon/Shader/lts_o.shader new file mode 100644 index 00000000..b19c4dc2 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_o.shader @@ -0,0 +1,754 @@ +Shader "Hidden/lilToonOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + UsePass "Hidden/ltspass_opaque/FORWARD" + UsePass "Hidden/ltspass_opaque/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_opaque/SHADOW_CASTER" + UsePass "Hidden/ltspass_opaque/DEPTHONLY" + UsePass "Hidden/ltspass_opaque/DEPTHNORMALS" + UsePass "Hidden/ltspass_opaque/MOTIONVECTORS" + UsePass "Hidden/ltspass_opaque/UNIVERSAL2D" + UsePass "Hidden/ltspass_opaque/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_o.shader.meta b/Assets/External/lilToon/Shader/lts_o.shader.meta new file mode 100644 index 00000000..d73bb412 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: efa77a80ca0344749b4f19fdd5891cbe +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_onetrans.shader b/Assets/External/lilToon/Shader/lts_onetrans.shader new file mode 100644 index 00000000..c4a69a7f --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_onetrans.shader @@ -0,0 +1,786 @@ +Shader "Hidden/lilToonOnePassTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD" + UsePass "Hidden/ltspass_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_onetrans.shader.meta b/Assets/External/lilToon/Shader/lts_onetrans.shader.meta new file mode 100644 index 00000000..03553a0d --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_onetrans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b269573b9937b8340b3e9e191a3ba5a8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_onetrans_o.shader b/Assets/External/lilToon/Shader/lts_onetrans_o.shader new file mode 100644 index 00000000..50ff10be --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_onetrans_o.shader @@ -0,0 +1,787 @@ +Shader "Hidden/lilToonOnePassTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD" + UsePass "Hidden/ltspass_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_onetrans_o.shader.meta b/Assets/External/lilToon/Shader/lts_onetrans_o.shader.meta new file mode 100644 index 00000000..9b58a66b --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_onetrans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7171688840c632447b22ec14e2bdef7e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_oo.shader b/Assets/External/lilToon/Shader/lts_oo.shader new file mode 100644 index 00000000..a846f37f --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_oo.shader @@ -0,0 +1,747 @@ +Shader "_lil/[Optional] lilToonOutlineOnly" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + UsePass "Hidden/ltspass_opaque/FORWARD_OUTLINE" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_oo.shader.meta b/Assets/External/lilToon/Shader/lts_oo.shader.meta new file mode 100644 index 00000000..263602b0 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_oo.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fba17785d6b2c594ab6c0303c834da65 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_overlay.shader b/Assets/External/lilToon/Shader/lts_overlay.shader new file mode 100644 index 00000000..8d8d8c62 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_overlay.shader @@ -0,0 +1,780 @@ +Shader "_lil/[Optional] lilToonOverlay" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_overlay.shader.meta b/Assets/External/lilToon/Shader/lts_overlay.shader.meta new file mode 100644 index 00000000..10d769a6 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_overlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 94274b8ef5d3af842b9427384cba3a8f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_overlay_one.shader b/Assets/External/lilToon/Shader/lts_overlay_one.shader new file mode 100644 index 00000000..223eb579 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_overlay_one.shader @@ -0,0 +1,780 @@ +Shader "_lil/[Optional] lilToonOverlayOnePass" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_overlay_one.shader.meta b/Assets/External/lilToon/Shader/lts_overlay_one.shader.meta new file mode 100644 index 00000000..d847605a --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_overlay_one.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 33e950d038b8dfd4f824f3985c2abfb7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_ref.shader b/Assets/External/lilToon/Shader/lts_ref.shader new file mode 100644 index 00000000..0556390c --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_ref.shader @@ -0,0 +1,1484 @@ +Shader "Hidden/lilToonRefraction" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.1 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 0.5 + [lilToggle] _RefractionColorFromMain ("sColorFromMain", Int) = 0 + _RefractionColor ("sColor", Color) = (1,1,1,1) + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_ref.shader.meta b/Assets/External/lilToon/Shader/lts_ref.shader.meta new file mode 100644 index 00000000..e45934f5 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_ref.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: dce3f3e248acc7b4daeda00daf616b4d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_ref_blur.shader b/Assets/External/lilToon/Shader/lts_ref_blur.shader new file mode 100644 index 00000000..d8061f1d --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_ref_blur.shader @@ -0,0 +1,1486 @@ +Shader "Hidden/lilToonRefractionBlur" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.1 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 0.5 + [lilToggle] _RefractionColorFromMain ("sColorFromMain", Int) = 0 + _RefractionColor ("sColor", Color) = (1,1,1,1) + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_REFRACTION_BLUR2 + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_REFRACTION_BLUR2 + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_ref_blur.shader.meta b/Assets/External/lilToon/Shader/lts_ref_blur.shader.meta new file mode 100644 index 00000000..b089fcd9 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_ref_blur.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3fb94a39b2685ee4d9817dcaf6542d99 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess.shader b/Assets/External/lilToon/Shader/lts_tess.shader new file mode 100644 index 00000000..b37a918d --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess.shader @@ -0,0 +1,753 @@ +Shader "Hidden/lilToonTessellation" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + UsePass "Hidden/ltspass_tess_opaque/FORWARD" + UsePass "Hidden/ltspass_tess_opaque/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_opaque/DEPTHONLY" + UsePass "Hidden/ltspass_tess_opaque/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_opaque/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_opaque/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_opaque/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess.shader.meta b/Assets/External/lilToon/Shader/lts_tess.shader.meta new file mode 100644 index 00000000..2fcfb56f --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3eef4aee6ba0de047b0d40409ea2891c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_cutout.shader b/Assets/External/lilToon/Shader/lts_tess_cutout.shader new file mode 100644 index 00000000..c9a5555c --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_cutout.shader @@ -0,0 +1,753 @@ +Shader "Hidden/lilToonTessellationCutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/ltspass_tess_cutout/FORWARD" + UsePass "Hidden/ltspass_tess_cutout/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_cutout/DEPTHONLY" + UsePass "Hidden/ltspass_tess_cutout/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_cutout/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_cutout/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_cutout/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_cutout.shader.meta b/Assets/External/lilToon/Shader/lts_tess_cutout.shader.meta new file mode 100644 index 00000000..cab87fd4 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_cutout.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bbfffd5515b843c41a85067191cbf687 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_cutout_o.shader b/Assets/External/lilToon/Shader/lts_tess_cutout_o.shader new file mode 100644 index 00000000..a858e83c --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_cutout_o.shader @@ -0,0 +1,754 @@ +Shader "Hidden/lilToonTessellationCutoutOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/ltspass_tess_cutout/FORWARD" + UsePass "Hidden/ltspass_tess_cutout/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_tess_cutout/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_cutout/DEPTHONLY" + UsePass "Hidden/ltspass_tess_cutout/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_cutout/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_cutout/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_cutout/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_cutout_o.shader.meta b/Assets/External/lilToon/Shader/lts_tess_cutout_o.shader.meta new file mode 100644 index 00000000..0ce4690a --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_cutout_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5ba517885727277409feada18effa4a6 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_o.shader b/Assets/External/lilToon/Shader/lts_tess_o.shader new file mode 100644 index 00000000..a2314380 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_o.shader @@ -0,0 +1,754 @@ +Shader "Hidden/lilToonTessellationOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + UsePass "Hidden/ltspass_tess_opaque/FORWARD" + UsePass "Hidden/ltspass_tess_opaque/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_tess_opaque/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_opaque/DEPTHONLY" + UsePass "Hidden/ltspass_tess_opaque/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_opaque/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_opaque/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_opaque/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_o.shader.meta b/Assets/External/lilToon/Shader/lts_tess_o.shader.meta new file mode 100644 index 00000000..579faf84 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c6d605ee23b18fc46903f38c67db701f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_onetrans.shader b/Assets/External/lilToon/Shader/lts_tess_onetrans.shader new file mode 100644 index 00000000..e9fe7b34 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_onetrans.shader @@ -0,0 +1,786 @@ +Shader "Hidden/lilToonTessellationOnePassTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_tess_transparent/FORWARD" + UsePass "Hidden/ltspass_tess_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_tess_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_onetrans.shader.meta b/Assets/External/lilToon/Shader/lts_tess_onetrans.shader.meta new file mode 100644 index 00000000..330b5eb8 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_onetrans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 90f83c35b0769a748abba5d0880f36d5 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader b/Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader new file mode 100644 index 00000000..6d233af4 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader @@ -0,0 +1,787 @@ +Shader "Hidden/lilToonTessellationOnePassTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_tess_transparent/FORWARD" + UsePass "Hidden/ltspass_tess_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_tess_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_tess_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader.meta b/Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader.meta new file mode 100644 index 00000000..5e04e55b --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_onetrans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 67ed0252d63362a4ab23707a720508b7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_trans.shader b/Assets/External/lilToon/Shader/lts_tess_trans.shader new file mode 100644 index 00000000..957e90af --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_trans.shader @@ -0,0 +1,786 @@ +Shader "Hidden/lilToonTessellationTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_tess_transparent/FORWARD" + UsePass "Hidden/ltspass_tess_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_tess_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_trans.shader.meta b/Assets/External/lilToon/Shader/lts_tess_trans.shader.meta new file mode 100644 index 00000000..7f8dd438 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_trans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: afa1a194f5a2fd243bda3a17bca1b36e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_trans_o.shader b/Assets/External/lilToon/Shader/lts_tess_trans_o.shader new file mode 100644 index 00000000..3a3d7927 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_trans_o.shader @@ -0,0 +1,787 @@ +Shader "Hidden/lilToonTessellationTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_tess_transparent/FORWARD" + UsePass "Hidden/ltspass_tess_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_tess_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_tess_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_trans_o.shader.meta b/Assets/External/lilToon/Shader/lts_tess_trans_o.shader.meta new file mode 100644 index 00000000..13e69a01 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_trans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9b0c2630b12933248922527d4507cfa9 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_twotrans.shader b/Assets/External/lilToon/Shader/lts_tess_twotrans.shader new file mode 100644 index 00000000..eb4a0204 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_twotrans.shader @@ -0,0 +1,787 @@ +Shader "Hidden/lilToonTessellationTwoPassTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_tess_transparent/FORWARD_BACK" + UsePass "Hidden/ltspass_tess_transparent/FORWARD" + UsePass "Hidden/ltspass_tess_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_tess_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_twotrans.shader.meta b/Assets/External/lilToon/Shader/lts_tess_twotrans.shader.meta new file mode 100644 index 00000000..63295e16 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_twotrans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7e398ea50f9b70045b1774e05b46a39f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader b/Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader new file mode 100644 index 00000000..bd7a917a --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader @@ -0,0 +1,788 @@ +Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_tess_transparent/FORWARD_BACK" + UsePass "Hidden/ltspass_tess_transparent/FORWARD" + UsePass "Hidden/ltspass_tess_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_tess_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_tess_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_tess_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_tess_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_tess_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_tess_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader.meta b/Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader.meta new file mode 100644 index 00000000..6953942e --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_tess_twotrans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7e61dbad981ad4f43a03722155db1c6a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_trans.shader b/Assets/External/lilToon/Shader/lts_trans.shader new file mode 100644 index 00000000..5cffd9df --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_trans.shader @@ -0,0 +1,786 @@ +Shader "Hidden/lilToonTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD" + UsePass "Hidden/ltspass_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_trans.shader.meta b/Assets/External/lilToon/Shader/lts_trans.shader.meta new file mode 100644 index 00000000..d14eceb2 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_trans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 165365ab7100a044ca85fc8c33548a62 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_trans_o.shader b/Assets/External/lilToon/Shader/lts_trans_o.shader new file mode 100644 index 00000000..7fa507e9 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_trans_o.shader @@ -0,0 +1,787 @@ +Shader "Hidden/lilToonTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD" + UsePass "Hidden/ltspass_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_trans_o.shader.meta b/Assets/External/lilToon/Shader/lts_trans_o.shader.meta new file mode 100644 index 00000000..2516f30a --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_trans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3c79b10c7e0b2784aaa4c2f8dd17d55e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_trans_oo.shader b/Assets/External/lilToon/Shader/lts_trans_oo.shader new file mode 100644 index 00000000..84274610 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_trans_oo.shader @@ -0,0 +1,780 @@ +Shader "_lil/[Optional] lilToonOutlineOnlyTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD_OUTLINE" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_trans_oo.shader.meta b/Assets/External/lilToon/Shader/lts_trans_oo.shader.meta new file mode 100644 index 00000000..6aee4aba --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_trans_oo.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0c762f24b85918a49812fc5690619178 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_twotrans.shader b/Assets/External/lilToon/Shader/lts_twotrans.shader new file mode 100644 index 00000000..aa4d7f3a --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_twotrans.shader @@ -0,0 +1,787 @@ +Shader "Hidden/lilToonTwoPassTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD_BACK" + UsePass "Hidden/ltspass_transparent/FORWARD" + UsePass "Hidden/ltspass_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_twotrans.shader.meta b/Assets/External/lilToon/Shader/lts_twotrans.shader.meta new file mode 100644 index 00000000..24ec0890 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_twotrans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6a77405f7dfdc1447af58854c7f43f39 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/lts_twotrans_o.shader b/Assets/External/lilToon/Shader/lts_twotrans_o.shader new file mode 100644 index 00000000..2c8bfb73 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_twotrans_o.shader @@ -0,0 +1,788 @@ +Shader "Hidden/lilToonTwoPassTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_transparent/FORWARD_BACK" + UsePass "Hidden/ltspass_transparent/FORWARD" + UsePass "Hidden/ltspass_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/lts_twotrans_o.shader.meta b/Assets/External/lilToon/Shader/lts_twotrans_o.shader.meta new file mode 100644 index 00000000..9e2ae199 --- /dev/null +++ b/Assets/External/lilToon/Shader/lts_twotrans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9cf054060007d784394b8b0bb703e441 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl.shader b/Assets/External/lilToon/Shader/ltsl.shader new file mode 100644 index 00000000..38e9ab22 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl.shader @@ -0,0 +1,238 @@ +Shader "Hidden/lilToonLite" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + UsePass "Hidden/ltspass_lite_opaque/FORWARD" + UsePass "Hidden/ltspass_lite_opaque/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_opaque/DEPTHONLY" + UsePass "Hidden/ltspass_lite_opaque/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_opaque/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_opaque/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_opaque/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl.shader.meta b/Assets/External/lilToon/Shader/ltsl.shader.meta new file mode 100644 index 00000000..141ecc62 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 381af8ba8e1740a41b9768ccfb0416c2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_cutout.shader b/Assets/External/lilToon/Shader/ltsl_cutout.shader new file mode 100644 index 00000000..2682a0b5 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_cutout.shader @@ -0,0 +1,238 @@ +Shader "Hidden/lilToonLiteCutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/ltspass_lite_cutout/FORWARD" + UsePass "Hidden/ltspass_lite_cutout/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_cutout/DEPTHONLY" + UsePass "Hidden/ltspass_lite_cutout/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_cutout/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_cutout/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_cutout/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_cutout.shader.meta b/Assets/External/lilToon/Shader/ltsl_cutout.shader.meta new file mode 100644 index 00000000..010dab6d --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_cutout.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b957dce3d03ff5445ac989f8de643c7f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_cutout_o.shader b/Assets/External/lilToon/Shader/ltsl_cutout_o.shader new file mode 100644 index 00000000..abe13a1e --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_cutout_o.shader @@ -0,0 +1,239 @@ +Shader "Hidden/lilToonLiteCutoutOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest"} + UsePass "Hidden/ltspass_lite_cutout/FORWARD" + UsePass "Hidden/ltspass_lite_cutout/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_lite_cutout/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_cutout/DEPTHONLY" + UsePass "Hidden/ltspass_lite_cutout/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_cutout/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_cutout/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_cutout/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_cutout_o.shader.meta b/Assets/External/lilToon/Shader/ltsl_cutout_o.shader.meta new file mode 100644 index 00000000..2b2f98e3 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_cutout_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8cf5267d397b04846856f6d3d9561da0 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_o.shader b/Assets/External/lilToon/Shader/ltsl_o.shader new file mode 100644 index 00000000..9da3e583 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_o.shader @@ -0,0 +1,239 @@ +Shader "Hidden/lilToonLiteOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + UsePass "Hidden/ltspass_lite_opaque/FORWARD" + UsePass "Hidden/ltspass_lite_opaque/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_lite_opaque/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_opaque/DEPTHONLY" + UsePass "Hidden/ltspass_lite_opaque/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_opaque/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_opaque/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_opaque/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_o.shader.meta b/Assets/External/lilToon/Shader/ltsl_o.shader.meta new file mode 100644 index 00000000..10025960 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 583a88005abb81a4ebbce757b4851a0d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_onetrans.shader b/Assets/External/lilToon/Shader/ltsl_onetrans.shader new file mode 100644 index 00000000..7a6cdab1 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_onetrans.shader @@ -0,0 +1,271 @@ +Shader "Hidden/lilToonLiteOnePassTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + UsePass "Hidden/ltspass_lite_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_lite_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_onetrans.shader.meta b/Assets/External/lilToon/Shader/ltsl_onetrans.shader.meta new file mode 100644 index 00000000..aff7ad87 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_onetrans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 34c2907eba944ed45a43970e0c11bcfd +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_onetrans_o.shader b/Assets/External/lilToon/Shader/ltsl_onetrans_o.shader new file mode 100644 index 00000000..347c3ab2 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_onetrans_o.shader @@ -0,0 +1,272 @@ +Shader "Hidden/lilToonLiteOnePassTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + UsePass "Hidden/ltspass_lite_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_lite_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_lite_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_onetrans_o.shader.meta b/Assets/External/lilToon/Shader/ltsl_onetrans_o.shader.meta new file mode 100644 index 00000000..08265de8 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_onetrans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 701268c07d37f5441b25b2cb99fae4b3 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_overlay.shader b/Assets/External/lilToon/Shader/ltsl_overlay.shader new file mode 100644 index 00000000..e224f217 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_overlay.shader @@ -0,0 +1,265 @@ +Shader "_lil/[Optional] lilToonLiteOverlay" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_overlay.shader.meta b/Assets/External/lilToon/Shader/ltsl_overlay.shader.meta new file mode 100644 index 00000000..16d2c1b1 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_overlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d28e4b78ba8368e49a44f86c0291df58 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_overlay_one.shader b/Assets/External/lilToon/Shader/ltsl_overlay_one.shader new file mode 100644 index 00000000..30aa6fa6 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_overlay_one.shader @@ -0,0 +1,265 @@ +Shader "_lil/[Optional] lilToonLiteOverlayOnePass" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_overlay_one.shader.meta b/Assets/External/lilToon/Shader/ltsl_overlay_one.shader.meta new file mode 100644 index 00000000..553226c6 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_overlay_one.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: dc9ded9f9d6f16c4e92cbb8f4269ae31 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_trans.shader b/Assets/External/lilToon/Shader/ltsl_trans.shader new file mode 100644 index 00000000..875b3b42 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_trans.shader @@ -0,0 +1,271 @@ +Shader "Hidden/lilToonLiteTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + UsePass "Hidden/ltspass_lite_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_lite_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_trans.shader.meta b/Assets/External/lilToon/Shader/ltsl_trans.shader.meta new file mode 100644 index 00000000..8d29c532 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_trans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0e3ece1bd59542743bccadb21f68318e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_trans_o.shader b/Assets/External/lilToon/Shader/ltsl_trans_o.shader new file mode 100644 index 00000000..822b0ac0 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_trans_o.shader @@ -0,0 +1,272 @@ +Shader "Hidden/lilToonLiteTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + UsePass "Hidden/ltspass_lite_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_lite_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_lite_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_trans_o.shader.meta b/Assets/External/lilToon/Shader/ltsl_trans_o.shader.meta new file mode 100644 index 00000000..cb59b347 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_trans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1c12a37046f07ac4486881deaf0187ea +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_twotrans.shader b/Assets/External/lilToon/Shader/ltsl_twotrans.shader new file mode 100644 index 00000000..ab10d7d1 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_twotrans.shader @@ -0,0 +1,272 @@ +Shader "Hidden/lilToonLiteTwoPassTransparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD_BACK" + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + UsePass "Hidden/ltspass_lite_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_lite_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_twotrans.shader.meta b/Assets/External/lilToon/Shader/ltsl_twotrans.shader.meta new file mode 100644 index 00000000..1babbb7e --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_twotrans.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 82226adb1a0b8c4418f574cfdcf523da +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsl_twotrans_o.shader b/Assets/External/lilToon/Shader/ltsl_twotrans_o.shader new file mode 100644 index 00000000..25d50b7b --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_twotrans_o.shader @@ -0,0 +1,273 @@ +Shader "Hidden/lilToonLiteTwoPassTransparentOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "TransparentCutout" "Queue" = "AlphaTest+10"} + UsePass "Hidden/ltspass_lite_transparent/FORWARD_BACK" + UsePass "Hidden/ltspass_lite_transparent/FORWARD" + UsePass "Hidden/ltspass_lite_transparent/FORWARD_OUTLINE" + UsePass "Hidden/ltspass_lite_transparent/SHADOW_CASTER" + UsePass "Hidden/ltspass_lite_transparent/DEPTHONLY" + UsePass "Hidden/ltspass_lite_transparent/DEPTHNORMALS" + UsePass "Hidden/ltspass_lite_transparent/MOTIONVECTORS" + UsePass "Hidden/ltspass_lite_transparent/UNIVERSAL2D" + UsePass "Hidden/ltspass_lite_transparent/META" + Pass + { + Tags { "LightMode" = "Never" } + + HLSLPROGRAM + // Unity strips unused UV channels from meshes; unfortunately, in 2022.3.13f1, Unity fails to detect that UV channels + // are used when they are referenced from a pass included via `UsePass`. This fake pass is #included directly into + // each shader to work around this; because this has an invalid lightmode set, it will never actually be executed. + // + // Unity bug report ID: IN-60271 + #pragma vertex vert + #pragma fragment frag + + // For some reason, using struct appdata from lil_common_appdata doesn't work as a workaround... + //#include "Includes/lil_pipeline_brp.hlsl" + //#include "Includes/lil_common.hlsl" + //#include "Includes/lil_common_appdata.hlsl" + + + struct appdata + { + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; + + float4 color : COLOR; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + uint vertexID : SV_VertexID; + #endif + + float4 pos : POSITION; + }; + + struct v2f + { + float4 pos : POSITION; + float4 col : TEXCOORD0; + }; + + struct v2f vert(struct appdata input) + { + struct v2f output; + // Don't actually render to the screen, but pass UV-derived data all the way down to the fragment + // shader so it shows up as an input in the compiled shader program. + output.pos = float4(0,0,0,1); + output.col = float4(input.uv, input.uv1) + float4(input.uv2, input.uv3) + + float4(input.uv4, input.uv5) + float4(input.uv6, input.uv7) + + input.color + float4(input.normalOS, 1) + input.tangentOS; + + #if !defined(SHADER_API_MOBILE) && !defined(SHADER_API_GLES) + output.col.a += input.vertexID; + #endif + + return output; + } + + float4 frag(v2f i) : SV_Target + { + return i.col; + } + ENDHLSL + } + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsl_twotrans_o.shader.meta b/Assets/External/lilToon/Shader/ltsl_twotrans_o.shader.meta new file mode 100644 index 00000000..afdeb6c2 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsl_twotrans_o.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 62df797f407281640a224388953448cc +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsmulti.shader b/Assets/External/lilToon/Shader/ltsmulti.shader new file mode 100644 index 00000000..87d56892 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti.shader @@ -0,0 +1,1559 @@ +Shader "_lil/lilToonMulti" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Geometry"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsmulti.shader.meta b/Assets/External/lilToon/Shader/ltsmulti.shader.meta new file mode 100644 index 00000000..812a7ce5 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9294844b15dca184d914a632279b24e1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsmulti_fur.shader b/Assets/External/lilToon/Shader/ltsmulti_fur.shader new file mode 100644 index 00000000..984d6051 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_fur.shader @@ -0,0 +1,1703 @@ +Shader "Hidden/lilToonMultiFur" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("ZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Transparent" "Queue" = "Transparent" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Main + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Transparent" "Queue" = "Transparent"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma require geometry + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_FUR + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Fur + Pass + { + Name "FORWARD_FUR" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_FurStencilRef] + ReadMask [_FurStencilReadMask] + WriteMask [_FurStencilWriteMask] + Comp [_FurStencilComp] + Pass [_FurStencilPass] + Fail [_FurStencilFail] + ZFail [_FurStencilZFail] + } + Cull [_FurCull] + ZClip [_FurZClip] + ZWrite [_FurZWrite] + ZTest [_FurZTest] + ColorMask [_FurColorMask] + Offset [_FurOffsetFactor], [_FurOffsetUnits] + BlendOp [_FurBlendOp], [_FurBlendOpAlpha] + Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha] + AlphaToMask [_FurAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma geometry geom + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Main + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_fur.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsmulti_fur.shader.meta b/Assets/External/lilToon/Shader/ltsmulti_fur.shader.meta new file mode 100644 index 00000000..bba58347 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_fur.shader.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1e50f1bc4d1b0e34cbf16b82589f6407 +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _ShadowStrengthMask: {instanceID: 0} + - _ShadowColorTex: {instanceID: 0} + - _ShadowBorderMask: {instanceID: 0} + - _ShadowBlurMask: {instanceID: 0} + - _Shadow2ndColorTex: {instanceID: 0} + - _FurNoiseMask: {fileID: 2800000, guid: 8a7dbcb2f4a32ec4297486403aee5f74, type: 3} + - _FurMask: {instanceID: 0} + - _FurLengthMask: {instanceID: 0} + - _FurVectorTex: {instanceID: 0} + - _BaseMap: {instanceID: 0} + - _BaseColorMap: {instanceID: 0} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsmulti_gem.shader b/Assets/External/lilToon/Shader/ltsmulti_gem.shader new file mode 100644 index 00000000..c6fa90ba --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_gem.shader @@ -0,0 +1,1514 @@ +Shader "Hidden/lilToonMultiGem" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.5 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + //Gem + _GemChromaticAberration ("sChromaticAberration", Range(0, 1)) = 0.02 + _GemEnvContrast ("sContrast", Float) = 2.0 + [lilHDR] _GemEnvColor ("sEnvironmentColor", Color) = (1,1,1,1) + _GemParticleLoop ("sParticleLoop", Float) = 8 + [lilHDR] _GemParticleColor ("sColor", Color) = (4,4,4,1) + _GemVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + #define LIL_MULTI + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_GEM + #define LIL_MULTI + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Pre + Pass + { + Name "FORWARD_PRE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + Blend One Zero + ZWrite [_ZWrite] + ZTest [_ZTest] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_GEM_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward_gem.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // AlphaMask and Dissolve + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsmulti_gem.shader.meta b/Assets/External/lilToon/Shader/ltsmulti_gem.shader.meta new file mode 100644 index 00000000..cab2a7a6 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_gem.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 69f861c14129e724096c0955f8079012 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsmulti_o.shader b/Assets/External/lilToon/Shader/ltsmulti_o.shader new file mode 100644 index 00000000..23c860db --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_o.shader @@ -0,0 +1,1726 @@ +Shader "Hidden/lilToonMultiOutline" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Outline + #pragma shader_feature_local _DETAIL_MULX2 + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_DITHER + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + #define LIL_MULTI_INPUTS_OUTLINE + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // Outline + #pragma shader_feature_local _DETAIL_MULX2 + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // Transparent mode + #pragma shader_feature_local UNITY_UI_ALPHACLIP + #pragma shader_feature_local UNITY_UI_CLIP_RECT + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + #pragma shader_feature_local ETC1_EXTERNAL_ALPHA + + // Main + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _FADING_ON + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsmulti_o.shader.meta b/Assets/External/lilToon/Shader/ltsmulti_o.shader.meta new file mode 100644 index 00000000..17b4b786 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_o.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 51b2dee0ab07bd84d8147601ff89e511 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltsmulti_ref.shader b/Assets/External/lilToon/Shader/ltsmulti_ref.shader new file mode 100644 index 00000000..5d8f9221 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_ref.shader @@ -0,0 +1,1464 @@ +Shader "Hidden/lilToonMultiRefraction" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.1 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 0.5 + [lilToggle] _RefractionColorFromMain ("sColorFromMain", Int) = 0 + _RefractionColor ("sColor", Color) = (1,1,1,1) + } + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100" "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {"RenderType" = "Opaque" "Queue" = "Transparent-100"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_REFRACTION + #define LIL_MULTI + #define LIL_MULTI_INPUTS_MAIN_TONECORRECTION + #define LIL_MULTI_INPUTS_MAIN2ND + #define LIL_MULTI_INPUTS_MAIN3RD + #define LIL_MULTI_INPUTS_ALPHAMASK + #define LIL_MULTI_INPUTS_SHADOW + #define LIL_MULTI_INPUTS_RIMSHADE + #define LIL_MULTI_INPUTS_BACKLIGHT + #define LIL_MULTI_INPUTS_EMISSION + #define LIL_MULTI_INPUTS_EMISSION_2ND + #define LIL_MULTI_INPUTS_NORMAL + #define LIL_MULTI_INPUTS_NORMAL_2ND + #define LIL_MULTI_INPUTS_ANISOTROPY + #define LIL_MULTI_INPUTS_REFLECTION + #define LIL_MULTI_INPUTS_MATCAP + #define LIL_MULTI_INPUTS_MATCAP_2ND + #define LIL_MULTI_INPUTS_RIM + #define LIL_MULTI_INPUTS_GLITTER + #define LIL_MULTI_INPUTS_PARALLAX + #define LIL_MULTI_INPUTS_DISTANCE_FADE + #define LIL_MULTI_INPUTS_AUDIOLINK + #define LIL_MULTI_INPUTS_DISSOLVE + #define LIL_MULTI_INPUTS_IDMASK + #define LIL_MULTI_INPUTS_UDIMDISCARD + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Main + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _COLORADDSUBDIFF_ON + #pragma shader_feature_local _COLORCOLOR_ON + #pragma shader_feature_local _SUNDISK_NONE + #pragma shader_feature_local GEOM_TYPE_FROND + #pragma shader_feature_local _REQUIRE_UV2 + #pragma shader_feature_local AUTO_KEY_VALUE + #pragma shader_feature_local ANTI_FLICKER + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + #pragma shader_feature_local _NORMALMAP + #pragma shader_feature_local EFFECT_BUMP + #pragma shader_feature_local SOURCE_GBUFFER + #pragma shader_feature_local _GLOSSYREFLECTIONS_OFF + #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local GEOM_TYPE_MESH + #pragma shader_feature_local _METALLICGLOSSMAP + #pragma shader_feature_local GEOM_TYPE_LEAF + #pragma shader_feature_local _SPECGLOSSMAP + #pragma shader_feature_local _PARALLAXMAP + #pragma shader_feature_local PIXELSNAP_ON + #pragma shader_feature_local _FADING_ON + #pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT + #pragma shader_feature_local _SUNDISK_HIGH_QUALITY + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + // AlphaMask and Dissolve + #pragma shader_feature_local _COLOROVERLAY_ON + #pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + // Tone correction and emission + #pragma shader_feature_local EFFECT_HUE_VARIATION + #pragma shader_feature_local _EMISSION + #pragma shader_feature_local GEOM_TYPE_BRANCH + #pragma shader_feature_local _SUNDISK_SIMPLE + + // Replace keywords + #include "Includes/lil_replace_keywords.hlsl" + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + CustomEditor "lilToon.lilToonInspector" +} diff --git a/Assets/External/lilToon/Shader/ltsmulti_ref.shader.meta b/Assets/External/lilToon/Shader/ltsmulti_ref.shader.meta new file mode 100644 index 00000000..0ce0e325 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltsmulti_ref.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d7af54cdd86902d41b8c240e06b93009 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_baker.shader b/Assets/External/lilToon/Shader/ltspass_baker.shader new file mode 100644 index 00000000..42c7a065 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_baker.shader @@ -0,0 +1,324 @@ +Shader "Hidden/ltsother_baker" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] _Color ("Color", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("Hue|Saturation|Value|Gamma", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("Use Main 2nd", Int) = 0 + _Color2nd ("Color", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("Angle", Float) = 0 + [lilToggle] _Main2ndTexIsDecal ("As Decal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("As MSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("Use Main 3rd", Int) = 0 + _Color3rd ("Color", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("Angle", Float) = 0 + [lilToggle] _Main3rdTexIsDecal ("As Decal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("As MSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Texture Packing + [NoScaleOffset] _PackingTexture1 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture2 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture3 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture4 ("Texture", 2D) = "white" {} + _PackingChannel1 ("Channel", Int) = 0 + _PackingChannel2 ("Channel", Int) = 0 + _PackingChannel3 ("Channel", Int) = 0 + _PackingChannel4 ("Channel", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Texture3D + [NoScaleOffset] _MainTex3D ("Texture", 3D) = "white" {} + _ResX ("ResX", Int) = 16 + _ResY ("ResY", Int) = 1 + } + + SubShader + { + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + ENDHLSL + + Pass + { + Cull Off + ZWrite Off + ZTest Always + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature _ _TRIMASK _ALPHAMASK _NORMAL_DXGL _TEXTURE_PACKING _LUT3D_TO_2D + + //------------------------------------------------------------------------------------------------------------------ + // Shader + #define LIL_BAKER + #define LIL_WITHOUT_ANIMATION + #include "Includes/lil_pipeline_brp.hlsl" + #include "Includes/lil_common.hlsl" + #include "Includes/lil_common_appdata.hlsl" + + TEXTURE2D(_PackingTexture1); + TEXTURE2D(_PackingTexture2); + TEXTURE2D(_PackingTexture3); + TEXTURE2D(_PackingTexture4); + TEXTURE3D(_MainTex3D); + uint _PackingChannel1; + uint _PackingChannel2; + uint _PackingChannel3; + uint _PackingChannel4; + uint _ResX; + uint _ResY; + + struct v2f + { + float4 positionCS : SV_POSITION; + float2 uv0 : TEXCOORD0; + float tangentW : TEXCOORD1; + }; + + v2f vert(appdata input) + { + v2f o; + LIL_VERTEX_POSITION_INPUTS(input.positionOS, vertexInput); + o.positionCS = vertexInput.positionCS; + o.uv0 = input.uv0; + o.tangentW = input.tangentOS.w; + return o; + } + + float4 frag(v2f input) : SV_Target + { + #if defined(_TRIMASK) + float4 col1 = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + float4 col2 = LIL_SAMPLE_2D(_Main2ndTex,sampler_Main2ndTex,input.uv0); + float4 col3 = LIL_SAMPLE_2D(_Main3rdTex,sampler_Main3rdTex,input.uv0); + float mat = lilGray(col1.rgb); + float rim = lilGray(col2.rgb); + float emi = lilGray(col3.rgb); + float4 col = float4(mat,rim,emi,1); + #elif defined(_ALPHAMASK) + float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + float alphaMask = LIL_SAMPLE_2D(_AlphaMask,sampler_MainTex,input.uv0).r; + alphaMask = saturate(alphaMask * _AlphaMaskScale + _AlphaMaskValue); + if(_AlphaMaskMode == 1) col.a = alphaMask; + if(_AlphaMaskMode == 2) col.a = col.a * alphaMask; + if(_AlphaMaskMode == 3) col.a = saturate(col.a + alphaMask); + if(_AlphaMaskMode == 4) col.a = saturate(col.a - alphaMask); + #elif defined(_NORMAL_DXGL) + float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + col.g = 1.0 - col.g; + #elif defined(_TEXTURE_PACKING) + float4 p1 = LIL_SAMPLE_2D(_PackingTexture1,lil_sampler_linear_clamp,input.uv0); + float4 p2 = LIL_SAMPLE_2D(_PackingTexture2,lil_sampler_linear_clamp,input.uv0); + float4 p3 = LIL_SAMPLE_2D(_PackingTexture3,lil_sampler_linear_clamp,input.uv0); + float4 p4 = LIL_SAMPLE_2D(_PackingTexture4,lil_sampler_linear_clamp,input.uv0); + float4 col = 1.0f; + if(_PackingChannel1 >= 4) { + col.r = dot(p1.rgb, 1.0/3.0); + } else { + col.r = p1[_PackingChannel1]; + } + if(_PackingChannel2 >= 4) { + col.g = dot(p2.rgb, 1.0/3.0); + } else { + col.g = p1[_PackingChannel2]; + } + if(_PackingChannel3 >= 4) { + col.b = dot(p3.rgb, 1.0/3.0); + } else { + col.b = p1[_PackingChannel3]; + } + if(_PackingChannel4 >= 4) { + col.a = dot(p4.rgb, 1.0/3.0); + } else { + col.a = p1[_PackingChannel4]; + } + #elif defined(_LUT3D_TO_2D) + float4 col; + float3 res = float3(_ResX, _ResY, _ResX * _ResY); + float3 resInv = rcp(float3(res.x, -res.y, res.z)); + float resMin = res.z - 1; + col.r = ((uint)input.positionCS.x % (uint)res.z) / resMin; + col.g = 1.0 - ((uint)input.positionCS.y % (uint)res.z) / resMin; + col.b = ((uint)input.positionCS.x / (uint)res.z) / resMin + ((_ResY - 1 - (uint)input.positionCS.y / (uint)res.z) / resMin * _ResX); + //col.rgb = (col.rgb - col.rgb * resInv.z) + 0.5 * resInv.z; + uint w,h,d,l; + _MainTex3D.GetDimensions(0,w,h,d,l); + col.rgb = (col.rgb - col.rgb / (float)w) + 0.5 / (float)w; + col.rgb = LIL_SAMPLE_3D(_MainTex3D, lil_sampler_linear_clamp, col.rgb).rgb; + col.a = 1; + #else + // Main + float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); + float3 baseColor = col.rgb; + float colorAdjustMask = LIL_SAMPLE_2D(_MainColorAdjustMask, sampler_MainTex, input.uv0).r; + col.rgb = lilToneCorrection(col.rgb, _MainTexHSVG); + #if defined(LIL_FEATURE_MAIN_GRADATION_MAP) + col.rgb = lilGradationMap(col.rgb, _MainGradationTex, _MainGradationStrength); + #endif + col.rgb = lerp(baseColor, col.rgb, colorAdjustMask); + col *= _Color; + + bool isRightHand = input.tangentW > 0.0; + + // 2nd + UNITY_BRANCH + if(_UseMain2ndTex) + { + _Color2nd *= LIL_GET_SUBTEX(_Main2ndTex,input.uv0); + col.rgb = lilBlendColor(col.rgb, _Color2nd.rgb, LIL_SAMPLE_2D(_Main2ndBlendMask,sampler_MainTex,input.uv0).r * _Color2nd.a, _Main2ndTexBlendMode); + } + + // 3rd + UNITY_BRANCH + if(_UseMain3rdTex) + { + _Color3rd *= LIL_GET_SUBTEX(_Main3rdTex,input.uv0); + col.rgb = lilBlendColor(col.rgb, _Color3rd.rgb, LIL_SAMPLE_2D(_Main3rdBlendMask,sampler_MainTex,input.uv0).r * _Color3rd.a, _Main3rdTexBlendMode); + } + #endif + + return col; + } + ENDHLSL + } + } +} diff --git a/Assets/External/lilToon/Shader/ltspass_baker.shader.meta b/Assets/External/lilToon/Shader/ltspass_baker.shader.meta new file mode 100644 index 00000000..ccb6c21e --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_baker.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f96a89829ccb1e54b85214550519a8d6 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_cutout.shader b/Assets/External/lilToon/Shader/ltspass_cutout.shader new file mode 100644 index 00000000..a70b2fdc --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_cutout.shader @@ -0,0 +1,1634 @@ +Shader "Hidden/ltspass_cutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_cutout.shader.meta b/Assets/External/lilToon/Shader/ltspass_cutout.shader.meta new file mode 100644 index 00000000..11e99804 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_cutout.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ad219df2a46e841488aee6a013e84e36 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_dummy.shader b/Assets/External/lilToon/Shader/ltspass_dummy.shader new file mode 100644 index 00000000..a38d3a32 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_dummy.shader @@ -0,0 +1,26 @@ +Shader "Hidden/ltspass_dummy" +{ + SubShader + { + // ForwardAdd + Pass + { + Name "FORWARD_ADD" + Tags {"LightMode" = "ForwardAdd"} + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + float4 vert() : SV_POSITION {return float4(0.0,0.0,0.0,0.0);} + float4 frag() : SV_Target {return float4(0.0,0.0,0.0,0.0);} + + ENDHLSL + } + } +} \ No newline at end of file diff --git a/Assets/External/lilToon/Shader/ltspass_dummy.shader.meta b/Assets/External/lilToon/Shader/ltspass_dummy.shader.meta new file mode 100644 index 00000000..833c5d4e --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_dummy.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2bde4bd29a2a70a4d9cf98772a6717ac +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_lite_cutout.shader b/Assets/External/lilToon/Shader/ltspass_lite_cutout.shader new file mode 100644 index 00000000..221804bd --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_lite_cutout.shader @@ -0,0 +1,920 @@ +Shader "Hidden/ltspass_lite_cutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_lite_cutout.shader.meta b/Assets/External/lilToon/Shader/ltspass_lite_cutout.shader.meta new file mode 100644 index 00000000..ad6b4f66 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_lite_cutout.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8a6ef0489c3ffbf46812460af3d52bb0 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_lite_opaque.shader b/Assets/External/lilToon/Shader/ltspass_lite_opaque.shader new file mode 100644 index 00000000..09180b30 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_lite_opaque.shader @@ -0,0 +1,920 @@ +Shader "Hidden/ltspass_lite_opaque" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 0 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_lite_opaque.shader.meta b/Assets/External/lilToon/Shader/ltspass_lite_opaque.shader.meta new file mode 100644 index 00000000..07905174 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_lite_opaque.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 59b5e58e88aae8a4ca42d1a7253e2fb2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_lite_transparent.shader b/Assets/External/lilToon/Shader/ltspass_lite_transparent.shader new file mode 100644 index 00000000..2c79bb04 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_lite_transparent.shader @@ -0,0 +1,1084 @@ +Shader "Hidden/ltspass_lite_transparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.3 + [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + _MatCapTex ("Texture", 2D) = "white" {} + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _MatCapMul ("Multiply", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (1,1,1,1) + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.1 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("Use Emission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.8,0.85,0.9,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 1 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma exclude_renderers d3d11_9x + #pragma fragmentoption ARB_precision_hint_fastest + #define LIL_LITE + + #pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + #pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION + ENDHLSL + + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_lite_transparent.shader.meta b/Assets/External/lilToon/Shader/ltspass_lite_transparent.shader.meta new file mode 100644 index 00000000..1b95998b --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_lite_transparent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8773c83ab40fff24b800f74360819a6c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_opaque.shader b/Assets/External/lilToon/Shader/ltspass_opaque.shader new file mode 100644 index 00000000..31ece93a --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_opaque.shader @@ -0,0 +1,1634 @@ +Shader "Hidden/ltspass_opaque" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 0 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_opaque.shader.meta b/Assets/External/lilToon/Shader/ltspass_opaque.shader.meta new file mode 100644 index 00000000..f3bd9b76 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_opaque.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 61b4f98a5d78b4a4a9d89180fac793fc +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_proponly.shader b/Assets/External/lilToon/Shader/ltspass_proponly.shader new file mode 100644 index 00000000..efacd251 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_proponly.shader @@ -0,0 +1,748 @@ +Shader "Hidden/ltspass_proponly" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("Blend Main", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("sColor", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("sColor", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("sColor", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("sColor", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("sColor", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("sColor", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("Blend Main", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("Blend Main", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("Blend Main", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Stencil Compare Function", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Stencil Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Stencil Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("Stencil ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("SrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("DstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Stencil Compare Function", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Stencil Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Stencil Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("Stencil ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Refraction + _RefractionStrength ("sStrength", Range(-1,1)) = 0.1 + [PowerSlider(3.0)]_RefractionFresnelPower ("sRefractionFresnel", Range(0.01, 10)) = 0.5 + [lilToggle] _RefractionColorFromMain ("sColorFromMain", Int) = 0 + _RefractionColor ("sColor", Color) = (1,1,1,1) + + //---------------------------------------------------------------------------------------------------------------------- + //Gem + _GemChromaticAberration ("sChromaticAberration", Range(0, 1)) = 0.02 + _GemEnvContrast ("sContrast", Float) = 2.0 + [lilHDR] _GemEnvColor ("sEnvironmentColor", Color) = (1,1,1,1) + _GemParticleLoop ("sParticleLoop", Float) = 8 + [lilHDR] _GemParticleColor ("sColor", Color) = (4,4,4,1) + _GemVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur + _FurNoiseMask ("Noise", 2D) = "white" {} + [NoScaleOffset] _FurMask ("Mask", 2D) = "white" {} + [NoScaleOffset] _FurLengthMask ("Length Mask", 2D) = "white" {} + [NoScaleOffset][Normal] _FurVectorTex ("Vector", 2D) = "bump" {} + _FurVectorScale ("Vector scale", Range(-10,10)) = 1 + [lilVec3Float] _FurVector ("sFurVectors", Vector) = (0.0,0.0,1.0,0.02) + [lilToggle] _VertexColor2FurVector ("sVertexColor2Vector", Int) = 0 + _FurGravity ("sGravity", Range(0,1)) = 0.25 + _FurRandomize ("sRandomize", Float) = 0 + _FurAO ("sAO", Range(0,1)) = 0 + [lilEnum] _FurMeshType ("Mesh Type|Subdivision|Shrink", Int) = 1 + [IntRange] _FurLayerNum ("sLayerNum", Range(1, 6)) = 2 + _FurRootOffset ("sRootWidth", Range(-1,0)) = 0 + _FurCutoutLength ("Cutout Length", Float) = 0.8 + _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 + _FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0) + [PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0 + _FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Fur Advanced + [lilEnum] _FurCull ("sCullModes", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlpha ("SrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlpha ("DstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _FurSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("sZClip", Int) = 1 + [lilToggle] _FurZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("sZTest", Int) = 4 + [IntRange] _FurStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _FurStencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _FurStencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _FurStencilComp ("Stencil Compare Function", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilPass ("Stencil Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilFail ("Stencil Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _FurStencilZFail ("Stencil ZFail", Float) = 0 + _FurOffsetFactor ("sOffsetFactor", Float) = 0 + _FurOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _FurColorMask ("sColorMask", Int) = 15 + [lilToggle] _FurAlphaToMask ("sAlphaToMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilVec3Float] _FakeShadowVector ("sFakeShadowVectors", Vector) = (0,0,0,0.05) + } + + SubShader + { + Pass + { + Tags {"LightMode" = "Dummy"} + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + void vert(){} + void frag(){} + ENDHLSL + } + } +} diff --git a/Assets/External/lilToon/Shader/ltspass_proponly.shader.meta b/Assets/External/lilToon/Shader/ltspass_proponly.shader.meta new file mode 100644 index 00000000..0769bc48 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_proponly.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: fd68f52288a6b0243bf6c217bf0930ea +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_tess_cutout.shader b/Assets/External/lilToon/Shader/ltspass_tess_cutout.shader new file mode 100644 index 00000000..2eabd1d2 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_tess_cutout.shader @@ -0,0 +1,1650 @@ +Shader "Hidden/ltspass_tess_cutout" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 1 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 1 + } + + HLSLINCLUDE + #define LIL_RENDER 1 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_tess_cutout.shader.meta b/Assets/External/lilToon/Shader/ltspass_tess_cutout.shader.meta new file mode 100644 index 00000000..cabba633 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_tess_cutout.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 14006db8206fb304aa86110d57626d40 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_tess_opaque.shader b/Assets/External/lilToon/Shader/ltspass_tess_opaque.shader new file mode 100644 index 00000000..5004f6cc --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_tess_opaque.shader @@ -0,0 +1,1650 @@ +Shader "Hidden/ltspass_tess_opaque" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("sCullModes", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("sCullModes", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 0 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_tess_opaque.shader.meta b/Assets/External/lilToon/Shader/ltspass_tess_opaque.shader.meta new file mode 100644 index 00000000..aba404f5 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_tess_opaque.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7a7ac427f85673a45a3e4190fc10bc28 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_tess_transparent.shader b/Assets/External/lilToon/Shader/ltspass_tess_transparent.shader new file mode 100644 index 00000000..5400fa81 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_tess_transparent.shader @@ -0,0 +1,1820 @@ +Shader "Hidden/ltspass_tess_transparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #define LIL_TESSELLATION + #pragma target 5.0 + #pragma exclude_renderers gles gles3 glcore + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vertTess + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma require tesshw tessellation + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_tess_transparent.shader.meta b/Assets/External/lilToon/Shader/ltspass_tess_transparent.shader.meta new file mode 100644 index 00000000..1574f4b4 --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_tess_transparent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bdf24b2e925ce8a4fb0e903889a52e0e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Shader/ltspass_transparent.shader b/Assets/External/lilToon/Shader/ltspass_transparent.shader new file mode 100644 index 00000000..f4889dac --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_transparent.shader @@ -0,0 +1,1798 @@ +Shader "Hidden/ltspass_transparent" +{ + Properties + { + //---------------------------------------------------------------------------------------------------------------------- + // Dummy + _DummyProperty ("If you are seeing this, some script is broken.", Float) = 0 + _DummyProperty ("This also happens if something other than lilToon is broken.", Float) = 0 + _DummyProperty ("You need to check the error on the console and take appropriate action, such as reinstalling the relevant tool.", Float) = 0 + _DummyProperty (" ", Float) = 0 + _DummyProperty ("これが表示されている場合、なんらかのスクリプトが壊れています。", Float) = 0 + _DummyProperty ("これはlilToon以外のものが壊れている場合にも発生します。", Float) = 0 + _DummyProperty ("コンソールでエラーを確認し、該当するツールを入れ直すなどの対処を行う必要があります。", Float) = 0 + [Space(1000)] + _DummyProperty ("", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Base + [lilToggle] _Invisible ("sInvisible", Int) = 0 + _AsUnlit ("sAsUnlit", Range(0, 1)) = 0 + _Cutoff ("sCutoff", Range(-0.001,1.001)) = 0.5 + _SubpassCutoff ("sSubpassCutoff", Range(0,1)) = 0.5 + [lilToggle] _FlipNormal ("sFlipBackfaceNormal", Int) = 0 + [lilToggle] _ShiftBackfaceUV ("sShiftBackfaceUV", Int) = 0 + _BackfaceForceShadow ("sBackfaceForceShadow", Range(0,1)) = 0 + [lilHDR] _BackfaceColor ("sColor", Color) = (0,0,0,0) + _VertexLightStrength ("sVertexLightStrength", Range(0,1)) = 0 + _LightMinLimit ("sLightMinLimit", Range(0,1)) = 0.05 + _LightMaxLimit ("sLightMaxLimit", Range(0,10)) = 1 + _BeforeExposureLimit ("sBeforeExposureLimit", Float) = 10000 + _MonochromeLighting ("sMonochromeLighting", Range(0,1)) = 0 + _AlphaBoostFA ("sAlphaBoostFA", Range(1,100)) = 10 + _lilDirectionalLightStrength ("sDirectionalLightStrength", Range(0,1)) = 1 + [lilVec3B] _LightDirectionOverride ("sLightDirectionOverrides", Vector) = (0.001,0.002,0.001,0) + _AAStrength ("sAAShading", Range(0, 1)) = 1 + [lilToggle] _UseDither ("sDither", Int) = 0 + [NoScaleOffset] _DitherTex ("Dither", 2D) = "white" {} + _DitherMaxValue ("Max Value", Float) = 255 + + //---------------------------------------------------------------------------------------------------------------------- + // Main + [lilHDR] [MainColor] _Color ("sColor", Color) = (1,1,1,1) + [MainTexture] _MainTex ("Texture", 2D) = "white" {} + [lilUVAnim] _MainTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _MainTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + _MainGradationStrength ("Gradation Strength", Range(0, 1)) = 0 + [NoScaleOffset] _MainGradationTex ("Gradation Map", 2D) = "white" {} + [NoScaleOffset] _MainColorAdjustMask ("Adjust Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Main2nd + [lilToggleLeft] _UseMain2ndTex ("sMainColor2nd", Int) = 0 + [lilHDR] _Color2nd ("sColor", Color) = (1,1,1,1) + _Main2ndTex ("Texture", 2D) = "white" {} + [lilAngle] _Main2ndTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main2ndTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main2ndTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main2ndTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main2ndTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main2ndTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main2ndTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main2ndTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main2ndTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main2ndTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main2ndTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main2ndTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main2ndBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main2ndTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main2ndTexAlphaMode ("sAlphaModes", Int) = 0 + _Main2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main2ndDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main2ndDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main2ndDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main2ndDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main2ndDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main2ndDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main2ndDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main2ndDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Main3rd + [lilToggleLeft] _UseMain3rdTex ("sMainColor3rd", Int) = 0 + [lilHDR] _Color3rd ("sColor", Color) = (1,1,1,1) + _Main3rdTex ("Texture", 2D) = "white" {} + [lilAngle] _Main3rdTexAngle ("sAngle", Float) = 0 + [lilUVAnim] _Main3rdTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Main3rdTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3|MatCap", Int) = 0 + [lilEnum] _Main3rdTex_Cull ("sCullModes", Int) = 0 + [lilDecalAnim] _Main3rdTexDecalAnimation ("sDecalAnimations", Vector) = (1,1,1,30) + [lilDecalSub] _Main3rdTexDecalSubParam ("sDecalSubParams", Vector) = (1,1,0,1) + [lilToggle] _Main3rdTexIsDecal ("sAsDecal", Int) = 0 + [lilToggle] _Main3rdTexIsLeftOnly ("Left Only", Int) = 0 + [lilToggle] _Main3rdTexIsRightOnly ("Right Only", Int) = 0 + [lilToggle] _Main3rdTexShouldCopy ("Copy", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipMirror ("Flip Mirror", Int) = 0 + [lilToggle] _Main3rdTexShouldFlipCopy ("Flip Copy", Int) = 0 + [lilToggle] _Main3rdTexIsMSDF ("sAsMSDF", Int) = 0 + [NoScaleOffset] _Main3rdBlendMask ("Mask", 2D) = "white" {} + [lilEnum] _Main3rdTexBlendMode ("sBlendModes", Int) = 0 + [lilEnum] _Main3rdTexAlphaMode ("sAlphaModes", Int) = 0 + _Main3rdEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _Main3rdDissolveMask ("Dissolve Mask", 2D) = "white" {} + _Main3rdDissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _Main3rdDissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _Main3rdDissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _Main3rdDissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _Main3rdDissolveParams ("sDissolveParams", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _Main3rdDissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + [lilFFFB] _Main3rdDistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Alpha Mask + [lilEnumLabel] _AlphaMaskMode ("sAlphaMaskModes", Int) = 0 + _AlphaMask ("AlphaMask", 2D) = "white" {} + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap + [lilToggleLeft] _UseBumpMap ("sNormalMap", Int) = 0 + [Normal] _BumpMap ("Normal Map", 2D) = "bump" {} + _BumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // NormalMap 2nd + [lilToggleLeft] _UseBump2ndMap ("sNormalMap2nd", Int) = 0 + [Normal] _Bump2ndMap ("Normal Map", 2D) = "bump" {} + [lilEnum] _Bump2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _Bump2ndScale ("Scale", Range(-10,10)) = 1 + [NoScaleOffset] _Bump2ndScaleMask ("Mask", 2D) = "white" {} + + //---------------------------------------------------------------------------------------------------------------------- + // Anisotropy + [lilToggleLeft] _UseAnisotropy ("sAnisotropy", Int) = 0 + [Normal] _AnisotropyTangentMap ("Tangent Map", 2D) = "bump" {} + _AnisotropyScale ("Scale", Range(-1,1)) = 1 + [NoScaleOffset] _AnisotropyScaleMask ("Scale Mask", 2D) = "white" {} + _AnisotropyTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _AnisotropyBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _AnisotropyShift ("sOffset", Range(-10,10)) = 0 + _AnisotropyShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _AnisotropySpecularStrength ("sStrength", Range(0,10)) = 1 + _Anisotropy2ndTangentWidth ("sTangentWidth", Range(0,10)) = 1 + _Anisotropy2ndBitangentWidth ("sBitangentWidth", Range(0,10)) = 1 + _Anisotropy2ndShift ("sOffset", Range(-10,10)) = 0 + _Anisotropy2ndShiftNoiseScale ("sNoiseStrength", Range(-1,1)) = 0 + _Anisotropy2ndSpecularStrength ("sStrength", Range(0,10)) = 0 + _AnisotropyShiftNoiseMask ("sNoise", 2D) = "white" {} + [lilToggle] _Anisotropy2Reflection ("sReflection", Int) = 0 + [lilToggle] _Anisotropy2MatCap ("sMatCap", Int) = 0 + [lilToggle] _Anisotropy2MatCap2nd ("sMatCap2nd", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Backlight + [lilToggleLeft] _UseBacklight ("sBacklight", Int) = 0 + [lilHDR] _BacklightColor ("sColor", Color) = (0.85,0.8,0.7,1.0) + [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _BacklightNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _BacklightBorder ("Border", Range(0, 1)) = 0.35 + _BacklightBlur ("sBlur", Range(0, 1)) = 0.05 + _BacklightDirectivity ("sDirectivity", Float) = 5.0 + _BacklightViewStrength ("sViewDirectionStrength", Range(0, 1)) = 1 + [lilToggle] _BacklightReceiveShadow ("sReceiveShadow", Int) = 1 + [lilToggle] _BacklightBackfaceMask ("sBackfaceMask", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Shadow + [lilToggleLeft] _UseShadow ("sShadow", Int) = 0 + _ShadowStrength ("sStrength", Range(0, 1)) = 1 + [NoScaleOffset] _ShadowStrengthMask ("sStrength", 2D) = "white" {} + [lilLOD] _ShadowStrengthMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBorderMask ("sBorder", 2D) = "white" {} + [lilLOD] _ShadowBorderMaskLOD ("LOD", Range(0, 1)) = 0 + [NoScaleOffset] _ShadowBlurMask ("sBlur", 2D) = "white" {} + [lilLOD] _ShadowBlurMaskLOD ("LOD", Range(0, 1)) = 0 + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) + [lilFF] _ShadowAOShift2 ("3rd Scale|3rd Offset", Vector) = (1,0,1,0) + [lilToggle] _ShadowPostAO ("sIgnoreBorderProperties", Int) = 0 + [lilEnum] _ShadowColorType ("sShadowColorTypes", Int) = 0 + _ShadowColor ("Shadow Color", Color) = (0.82,0.76,0.85,1.0) + [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} + _ShadowNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _ShadowBorder ("sBorder", Range(0, 1)) = 0.5 + _ShadowBlur ("sBlur", Range(0, 1)) = 0.1 + _ShadowReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow2ndColor ("2nd Color", Color) = (0.68,0.66,0.79,1) + [NoScaleOffset] _Shadow2ndColorTex ("2nd Color", 2D) = "black" {} + _Shadow2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("sBorder", Range(0, 1)) = 0.15 + _Shadow2ndBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow2ndReceive ("sReceiveShadow", Range(0, 1)) = 0 + _Shadow3rdColor ("3rd Color", Color) = (0,0,0,0) + [NoScaleOffset] _Shadow3rdColorTex ("3rd Color", 2D) = "black" {} + _Shadow3rdNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _Shadow3rdBorder ("sBorder", Range(0, 1)) = 0.25 + _Shadow3rdBlur ("sBlur", Range(0, 1)) = 0.1 + _Shadow3rdReceive ("sReceiveShadow", Range(0, 1)) = 0 + _ShadowBorderColor ("sShadowBorderColor", Color) = (1,0.1,0,1) + _ShadowBorderRange ("sShadowBorderRange", Range(0, 1)) = 0.08 + _ShadowMainStrength ("sContrast", Range(0, 1)) = 0 + _ShadowEnvStrength ("sShadowEnvStrength", Range(0, 1)) = 0 + [lilEnum] _ShadowMaskType ("sShadowMaskTypes", Int) = 0 + _ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1 + _ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim Shade + [lilToggleLeft] _UseRimShade ("RimShade", Int) = 0 + _RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0) + [NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {} + _RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimShadeBorder ("sBorder", Range(0, 1)) = 0.5 + _RimShadeBlur ("sBlur", Range(0, 1)) = 1.0 + [PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0 + + //---------------------------------------------------------------------------------------------------------------------- + // Reflection + [lilToggleLeft] _UseReflection ("sReflection", Int) = 0 + // Smoothness + _Smoothness ("Smoothness", Range(0, 1)) = 1 + [NoScaleOffset] _SmoothnessTex ("Smoothness", 2D) = "white" {} + // Metallic + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + [NoScaleOffset] _MetallicGlossMap ("Metallic", 2D) = "white" {} + // Reflectance + [Gamma] _Reflectance ("sReflectance", Range(0, 1)) = 0.04 + // Reflection + _GSAAStrength ("GSAA", Range(0, 1)) = 0 + [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 + [lilToggle] _ApplySpecularFA ("sMultiLightSpecular", Int) = 1 + [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _SpecularBorder ("sBorder", Range(0, 1)) = 0.5 + _SpecularBlur ("sBlur", Range(0, 1)) = 0.0 + [lilToggle] _ApplyReflection ("sApplyReflection", Int) = 0 + _ReflectionNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilHDR] _ReflectionColor ("sColor", Color) = (1,1,1,1) + [NoScaleOffset] _ReflectionColorTex ("sColor", 2D) = "white" {} + [lilToggle] _ReflectionApplyTransparency ("sApplyTransparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("sColor", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("sEnableLighting+ (Fallback)", Range(0, 1)) = 1 + [lilEnum] _ReflectionBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap + [lilToggleLeft] _UseMatCap ("sMatCap", Int) = 0 + [lilHDR] _MatCapColor ("sColor", Color) = (1,1,1,1) + _MatCapTex ("Texture", 2D) = "white" {} + _MatCapMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCapBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCapZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCapPerspective ("sFixPerspective", Int) = 1 + _MatCapVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCapBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCapBlendMask ("Mask", 2D) = "white" {} + _MatCapEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCapShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCapBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCapLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCapBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCapApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCapNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCapCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} + _MatCapBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // MatCap 2nd + [lilToggleLeft] _UseMatCap2nd ("sMatCap2nd", Int) = 0 + [lilHDR] _MatCap2ndColor ("sColor", Color) = (1,1,1,1) + _MatCap2ndTex ("Texture", 2D) = "white" {} + _MatCap2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + [lilVec2R] _MatCap2ndBlendUV1 ("sBlendUV1", Vector) = (0,0,0,0) + [lilToggle] _MatCap2ndZRotCancel ("sMatCapZRotCancel", Int) = 1 + [lilToggle] _MatCap2ndPerspective ("sFixPerspective", Int) = 1 + _MatCap2ndVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + _MatCap2ndBlend ("Blend", Range(0, 1)) = 1 + [NoScaleOffset] _MatCap2ndBlendMask ("Mask", 2D) = "white" {} + _MatCap2ndEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _MatCap2ndShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _MatCap2ndBackfaceMask ("sBackfaceMask", Int) = 0 + _MatCap2ndLod ("sBlur", Range(0, 10)) = 0 + [lilEnum] _MatCap2ndBlendMode ("sBlendModes", Int) = 1 + [lilToggle] _MatCap2ndApplyTransparency ("sApplyTransparency", Int) = 1 + _MatCap2ndNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + [lilToggle] _MatCap2ndCustomNormal ("sMatCapCustomNormal", Int) = 0 + [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} + _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Rim + [lilToggleLeft] _UseRim ("sRimLight", Int) = 0 + [lilHDR] _RimColor ("sColor", Color) = (0.66,0.5,0.48,1) + [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _RimNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _RimBorder ("sBorder", Range(0, 1)) = 0.5 + _RimBlur ("sBlur", Range(0, 1)) = 0.65 + [PowerSlider(3.0)]_RimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.5 + _RimEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _RimShadowMask ("sShadowMask", Range(0, 1)) = 0.5 + [lilToggle] _RimBackfaceMask ("sBackfaceMask", Int) = 1 + _RimVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 1 + [lilToggle] _RimApplyTransparency ("sApplyTransparency", Int) = 1 + _RimDirStrength ("sRimLightDirection", Range(0, 1)) = 0 + _RimDirRange ("sRimDirectionRange", Range(-1, 1)) = 0 + _RimIndirRange ("sRimIndirectionRange", Range(-1, 1)) = 0 + [lilHDR] _RimIndirColor ("sColor", Color) = (1,1,1,1) + _RimIndirBorder ("sBorder", Range(0, 1)) = 0.5 + _RimIndirBlur ("sBlur", Range(0, 1)) = 0.1 + [lilEnum] _RimBlendMode ("sBlendModes", Int) = 1 + + //---------------------------------------------------------------------------------------------------------------------- + // Glitter + [lilToggleLeft] _UseGlitter ("sGlitter", Int) = 0 + [lilEnum] _GlitterUVMode ("UV Mode|UV0|UV1", Int) = 0 + [lilHDR] _GlitterColor ("sColor", Color) = (1,1,1,1) + _GlitterColorTex ("Texture", 2D) = "white" {} + [lilEnum] _GlitterColorTex_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _GlitterMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _GlitterNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0 + _GlitterScaleRandomize ("sRandomize+ (Size)", Range(0, 1)) = 0 + [lilToggle] _GlitterApplyShape ("Shape", Int) = 0 + _GlitterShapeTex ("Texture", 2D) = "white" {} + [lilVec2] _GlitterAtras ("Atras", Vector) = (1,1,0,0) + [lilToggle] _GlitterAngleRandomize ("sRandomize+ (+sAngle+)", Int) = 0 + [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) + [lilGlitParam2] _GlitterParams2 ("sGlitterParams2", Vector) = (0.25,0,0,0) + _GlitterPostContrast ("sPostContrast", Float) = 1 + _GlitterSensitivity ("Sensitivity", Float) = 0.25 + _GlitterEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _GlitterShadowMask ("sShadowMask", Range(0, 1)) = 0 + [lilToggle] _GlitterBackfaceMask ("sBackfaceMask", Int) = 0 + [lilToggle] _GlitterApplyTransparency ("sApplyTransparency", Int) = 1 + _GlitterVRParallaxStrength ("sVRParallaxStrength", Range(0, 1)) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision + [lilToggleLeft] _UseEmission ("sEmission", Int) = 0 + [HDR][lilHDR] _EmissionColor ("sColor", Color) = (1,1,1,1) + _EmissionMap ("Texture", 2D) = "white" {} + [lilUVAnim] _EmissionMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _EmissionMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _EmissionBlend ("Blend", Range(0,1)) = 1 + _EmissionBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _EmissionBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _EmissionBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _EmissionBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _EmissionUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _EmissionGradTex ("Gradation Texture", 2D) = "white" {} + _EmissionGradSpeed ("Gradation Speed", Float) = 1 + _EmissionParallaxDepth ("sParallaxDepth", float) = 0 + _EmissionFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _egci ("", Int) = 2 + [HideInInspector] _egai ("", Int) = 2 + [HideInInspector] _egc0 ("", Color) = (1,1,1,0) + [HideInInspector] _egc1 ("", Color) = (1,1,1,1) + [HideInInspector] _egc2 ("", Color) = (1,1,1,0) + [HideInInspector] _egc3 ("", Color) = (1,1,1,0) + [HideInInspector] _egc4 ("", Color) = (1,1,1,0) + [HideInInspector] _egc5 ("", Color) = (1,1,1,0) + [HideInInspector] _egc6 ("", Color) = (1,1,1,0) + [HideInInspector] _egc7 ("", Color) = (1,1,1,0) + [HideInInspector] _ega0 ("", Color) = (1,0,0,0) + [HideInInspector] _ega1 ("", Color) = (1,0,0,1) + [HideInInspector] _ega2 ("", Color) = (1,0,0,0) + [HideInInspector] _ega3 ("", Color) = (1,0,0,0) + [HideInInspector] _ega4 ("", Color) = (1,0,0,0) + [HideInInspector] _ega5 ("", Color) = (1,0,0,0) + [HideInInspector] _ega6 ("", Color) = (1,0,0,0) + [HideInInspector] _ega7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Emmision2nd + [lilToggleLeft] _UseEmission2nd ("sEmission2nd", Int) = 0 + [HDR][lilHDR] _Emission2ndColor ("sColor", Color) = (1,1,1,1) + _Emission2ndMap ("Texture", 2D) = "white" {} + [lilUVAnim] _Emission2ndMap_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 + _Emission2ndMainStrength ("sMainColorPower", Range(0, 1)) = 0 + _Emission2ndBlend ("Blend", Range(0,1)) = 1 + _Emission2ndBlendMask ("Mask", 2D) = "white" {} + [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndBlendMode ("sBlendModes", Int) = 1 + [lilBlink] _Emission2ndBlink ("sBlinkSettings", Vector) = (0,0,3.141593,0) + [lilToggle] _Emission2ndUseGrad ("sGradation", Int) = 0 + [NoScaleOffset] _Emission2ndGradTex ("Gradation Texture", 2D) = "white" {} + _Emission2ndGradSpeed ("Gradation Speed", Float) = 1 + _Emission2ndParallaxDepth ("sParallaxDepth", float) = 0 + _Emission2ndFluorescence ("sFluorescence", Range(0,1)) = 0 + // Gradation + [HideInInspector] _e2gci ("", Int) = 2 + [HideInInspector] _e2gai ("", Int) = 2 + [HideInInspector] _e2gc0 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc1 ("", Color) = (1,1,1,1) + [HideInInspector] _e2gc2 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc3 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc4 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc5 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc6 ("", Color) = (1,1,1,0) + [HideInInspector] _e2gc7 ("", Color) = (1,1,1,0) + [HideInInspector] _e2ga0 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga1 ("", Color) = (1,0,0,1) + [HideInInspector] _e2ga2 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga3 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga4 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga5 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga6 ("", Color) = (1,0,0,0) + [HideInInspector] _e2ga7 ("", Color) = (1,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Parallax + [lilToggleLeft] _UseParallax ("sParallax", Int) = 0 + [lilToggle] _UsePOM ("sPOM", Int) = 0 + [NoScaleOffset] _ParallaxMap ("Parallax Map", 2D) = "gray" {} + _Parallax ("Parallax Scale", float) = 0.02 + _ParallaxOffset ("sParallaxOffset", float) = 0.5 + + //---------------------------------------------------------------------------------------------------------------------- + // Distance Fade + [lilHDR] _DistanceFadeColor ("sColor", Color) = (0,0,0,1) + [lilFFFB] _DistanceFade ("sDistanceFadeSettings", Vector) = (0.1,0.01,0,0) + [lilEnum] _DistanceFadeMode ("sDistanceFadeModes", Int) = 0 + [lilHDR] _DistanceFadeRimColor ("sColor", Color) = (0,0,0,0) + [PowerSlider(3.0)]_DistanceFadeRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 5.0 + + //---------------------------------------------------------------------------------------------------------------------- + // AudioLink + [lilToggleLeft] _UseAudioLink ("sAudioLink", Int) = 0 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("sAudioLinkUVModes", Int) = 1 + [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + _AudioLinkMask ("Mask", 2D) = "blue" {} + [lilUVAnim] _AudioLinkMask_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilEnum] _AudioLinkMask_UVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + [lilToggle] _AudioLink2Main2nd ("sMainColor2nd", Int) = 0 + [lilToggle] _AudioLink2Main3rd ("sMainColor3rd", Int) = 0 + [lilToggle] _AudioLink2Emission ("sEmission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("sEmission+sGradation", Int) = 0 + [lilToggle] _AudioLink2Emission2nd ("sEmission2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("sEmission2nd+sGradation", Int) = 0 + [lilToggle] _AudioLink2Vertex ("sVertex", Int) = 0 + [lilEnum] _AudioLinkVertexUVMode ("sAudioLinkVertexUVModes", Int) = 1 + [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|sAngle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkVertexStart ("sAudioLinkStartPosition", Vector) = (0.0,0.0,0.0,0.0) + [lilVec3Float] _AudioLinkVertexStrength ("sAudioLinkVertexStrengths", Vector) = (0.0,0.0,0.0,1.0) + [lilToggle] _AudioLinkAsLocal ("sAudioLinkAsLocal", Int) = 0 + [NoScaleOffset] _AudioLinkLocalMap ("Local Map", 2D) = "black" {} + [lilALLocal] _AudioLinkLocalMapParams ("sAudioLinkLocalMapParams", Vector) = (120,1,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // Dissolve + _DissolveMask ("Dissolve Mask", 2D) = "white" {} + _DissolveNoiseMask ("Dissolve Noise Mask", 2D) = "gray" {} + [lilUVAnim] _DissolveNoiseMask_ScrollRotate ("Scroll", Vector) = (0,0,0,0) + _DissolveNoiseStrength ("Dissolve Noise Strength", float) = 0.1 + [lilHDR] _DissolveColor ("sColor", Color) = (1,1,1,1) + [lilDissolve] _DissolveParams ("sDissolveParamsModes", Vector) = (0,0,0.5,0.1) + [lilDissolveP] _DissolvePos ("Dissolve Position", Vector) = (0,0,0,0) + + //---------------------------------------------------------------------------------------------------------------------- + // ID Mask + // _IDMaskCompile will enable compilation of IDMask-related systems. For compatibility, setting certain + // parameters to non-zero values will also enable the IDMask feature, but this enable switch ensures that + // animator-controlled IDMasked meshes will be compiled correctly. Note that this _only_ controls compilation, + // and is ignored at runtime. + [ToggleUI] _IDMaskCompile ("_IDMaskCompile", Int) = 0 + [lilEnum] _IDMaskFrom ("_IDMaskFrom|0: UV0|1: UV1|2: UV2|3: UV3|4: UV4|5: UV5|6: UV6|7: UV7|8: VertexID", Int) = 8 + [ToggleUI] _IDMask1 ("_IDMask1", Int) = 0 + [ToggleUI] _IDMask2 ("_IDMask2", Int) = 0 + [ToggleUI] _IDMask3 ("_IDMask3", Int) = 0 + [ToggleUI] _IDMask4 ("_IDMask4", Int) = 0 + [ToggleUI] _IDMask5 ("_IDMask5", Int) = 0 + [ToggleUI] _IDMask6 ("_IDMask6", Int) = 0 + [ToggleUI] _IDMask7 ("_IDMask7", Int) = 0 + [ToggleUI] _IDMask8 ("_IDMask8", Int) = 0 + [ToggleUI] _IDMaskIsBitmap ("_IDMaskIsBitmap", Int) = 0 + _IDMaskIndex1 ("_IDMaskIndex1", Int) = 0 + _IDMaskIndex2 ("_IDMaskIndex2", Int) = 0 + _IDMaskIndex3 ("_IDMaskIndex3", Int) = 0 + _IDMaskIndex4 ("_IDMaskIndex4", Int) = 0 + _IDMaskIndex5 ("_IDMaskIndex5", Int) = 0 + _IDMaskIndex6 ("_IDMaskIndex6", Int) = 0 + _IDMaskIndex7 ("_IDMaskIndex7", Int) = 0 + _IDMaskIndex8 ("_IDMaskIndex8", Int) = 0 + + [ToggleUI] _IDMaskControlsDissolve ("_IDMaskControlsDissolve", Int) = 0 + [ToggleUI] _IDMaskPrior1 ("_IDMaskPrior1", Int) = 0 + [ToggleUI] _IDMaskPrior2 ("_IDMaskPrior2", Int) = 0 + [ToggleUI] _IDMaskPrior3 ("_IDMaskPrior3", Int) = 0 + [ToggleUI] _IDMaskPrior4 ("_IDMaskPrior4", Int) = 0 + [ToggleUI] _IDMaskPrior5 ("_IDMaskPrior5", Int) = 0 + [ToggleUI] _IDMaskPrior6 ("_IDMaskPrior6", Int) = 0 + [ToggleUI] _IDMaskPrior7 ("_IDMaskPrior7", Int) = 0 + [ToggleUI] _IDMaskPrior8 ("_IDMaskPrior8", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // UDIM Discard + [lilToggleLeft] _UDIMDiscardCompile ("sUDIMDiscard", Int) = 0 + [lilEnum] _UDIMDiscardUV ("sUDIMDiscardUV|0: UV0|1: UV1|2: UV2|3: UV3", Int) = 0 + [lilEnum] _UDIMDiscardMode ("sUDIMDiscardMode|0: Vertex|1: Pixel (slower)", Int) = 0 + [lilToggle] _UDIMDiscardRow3_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow3_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow2_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow1_0 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_3 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_2 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_1 ("", Int) = 0 + [lilToggle] _UDIMDiscardRow0_0 ("", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Encryption + [lilToggle] _IgnoreEncryption ("sIgnoreEncryption", Int) = 0 + _Keys ("sKeys", Vector) = (0,0,0,0) + _BitKey0 ("_BitKey0", Float) = 0 + _BitKey1 ("_BitKey1", Float) = 0 + _BitKey2 ("_BitKey2", Float) = 0 + _BitKey3 ("_BitKey3", Float) = 0 + _BitKey4 ("_BitKey4", Float) = 0 + _BitKey5 ("_BitKey5", Float) = 0 + _BitKey6 ("_BitKey6", Float) = 0 + _BitKey7 ("_BitKey7", Float) = 0 + _BitKey8 ("_BitKey8", Float) = 0 + _BitKey9 ("_BitKey9", Float) = 0 + _BitKey10 ("_BitKey10", Float) = 0 + _BitKey11 ("_BitKey11", Float) = 0 + _BitKey12 ("_BitKey12", Float) = 0 + _BitKey13 ("_BitKey13", Float) = 0 + _BitKey14 ("_BitKey14", Float) = 0 + _BitKey15 ("_BitKey15", Float) = 0 + _BitKey16 ("_BitKey16", Float) = 0 + _BitKey17 ("_BitKey17", Float) = 0 + _BitKey18 ("_BitKey18", Float) = 0 + _BitKey19 ("_BitKey19", Float) = 0 + _BitKey20 ("_BitKey20", Float) = 0 + _BitKey21 ("_BitKey21", Float) = 0 + _BitKey22 ("_BitKey22", Float) = 0 + _BitKey23 ("_BitKey23", Float) = 0 + _BitKey24 ("_BitKey24", Float) = 0 + _BitKey25 ("_BitKey25", Float) = 0 + _BitKey26 ("_BitKey26", Float) = 0 + _BitKey27 ("_BitKey27", Float) = 0 + _BitKey28 ("_BitKey28", Float) = 0 + _BitKey29 ("_BitKey29", Float) = 0 + _BitKey30 ("_BitKey30", Float) = 0 + _BitKey31 ("_BitKey31", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline + [lilHDR] _OutlineColor ("sColor", Color) = (0.6,0.56,0.73,1) + _OutlineTex ("Texture", 2D) = "white" {} + [lilUVAnim] _OutlineTex_ScrollRotate ("sScrollRotates", Vector) = (0,0,0,0) + [lilHSVG] _OutlineTexHSVG ("sHSVGs", Vector) = (0,1,1,1) + [lilHDR] _OutlineLitColor ("sColor", Color) = (1.0,0.2,0,0) + [lilToggle] _OutlineLitApplyTex ("sColorFromMain", Int) = 0 + _OutlineLitScale ("Scale", Float) = 10 + _OutlineLitOffset ("Offset", Float) = -8 + [lilToggle] _OutlineLitShadowReceive ("sReceiveShadow", Int) = 0 + [lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.08 + [NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {} + _OutlineFixWidth ("sFixWidth", Range(0,1)) = 0.5 + [lilEnum] _OutlineVertexR2Width ("sOutlineVertexColorUsages", Int) = 0 + [lilToggle] _OutlineDeleteMesh ("sDeleteMesh0", Int) = 0 + [NoScaleOffset][Normal] _OutlineVectorTex ("Vector", 2D) = "bump" {} + [lilEnum] _OutlineVectorUVMode ("UV Mode|UV0|UV1|UV2|UV3", Int) = 0 + _OutlineVectorScale ("Vector scale", Range(-10,10)) = 1 + _OutlineEnableLighting ("sEnableLighting", Range(0, 1)) = 1 + _OutlineZBias ("Z Bias", Float) = 0 + [lilToggle] _OutlineDisableInVR ("sDisableInVR", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Tessellation + _TessEdge ("sTessellationEdge", Range(1, 100)) = 10 + _TessStrength ("sStrength", Range(0, 1)) = 0.5 + _TessShrink ("sTessellationShrink", Range(0, 1)) = 0.0 + [IntRange] _TessFactorMax ("sTessellationFactor", Range(1, 8)) = 3 + + //---------------------------------------------------------------------------------------------------------------------- + // For Multi + [lilToggleLeft] _UseOutline ("Use Outline", Int) = 0 + [lilEnum] _TransparentMode ("Rendering Mode|Opaque|Cutout|Transparent|Refraction|Fur|FurCutout|Gem", Int) = 0 + [lilToggle] _UseClippingCanceller ("sSettingClippingCanceller", Int) = 0 + [lilToggle] _AsOverlay ("sAsOverlay", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Save (Unused) + [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) + [HideInInspector] _BaseMap ("Texture", 2D) = "white" {} + [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} + [HideInInspector] _lilToonVersion ("Version", Int) = 45 + + //---------------------------------------------------------------------------------------------------------------------- + // Advanced + [lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("sZClip", Int) = 1 + [lilToggle] _ZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("sZTest", Int) = 4 + [IntRange] _StencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("ZFail", Float) = 0 + _OffsetFactor ("sOffsetFactor", Float) = 0 + _OffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _ColorMask ("sColorMask", Int) = 15 + [lilToggle] _AlphaToMask ("sAlphaToMask", Int) = 0 + _lilShadowCasterBias ("Shadow Caster Bias", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Outline Advanced + [lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("sSrcBlendRGB", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("sZClip", Int) = 1 + [lilToggle] _OutlineZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("sZTest", Int) = 2 + [IntRange] _OutlineStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("ZFail", Float) = 0 + _OutlineOffsetFactor ("sOffsetFactor", Float) = 0 + _OutlineOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _OutlineColorMask ("sColorMask", Int) = 15 + [lilToggle] _OutlineAlphaToMask ("sAlphaToMask", Int) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Pre + [lilHDR] [MainColor] _PreColor ("sColor", Color) = (1,1,1,1) + [lilEnum] _PreOutType ("sPreOutTypes", Int) = 0 + _PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5 + [lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("sDstBlendRGB", Int) = 10 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("sSrcBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("sDstBlendAlpha", Int) = 10 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("sBlendOpRGB", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("sBlendOpAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("sSrcBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("sDstBlendRGB", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("sSrcBlendAlpha", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("sDstBlendAlpha", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("sBlendOpRGB", Int) = 4 + [Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("sBlendOpAlpha", Int) = 4 + [lilToggle] _PreZClip ("sZClip", Int) = 1 + [lilToggle] _PreZWrite ("sZWrite", Int) = 1 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("sZTest", Int) = 4 + [IntRange] _PreStencilRef ("Ref", Range(0, 255)) = 0 + [IntRange] _PreStencilReadMask ("ReadMask", Range(0, 255)) = 255 + [IntRange] _PreStencilWriteMask ("WriteMask", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Comp", Float) = 8 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Pass", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Fail", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("ZFail", Float) = 0 + _PreOffsetFactor ("sOffsetFactor", Float) = 0 + _PreOffsetUnits ("sOffsetUnits", Float) = 0 + [lilColorMask] _PreColorMask ("sColorMask", Int) = 15 + [lilToggle] _PreAlphaToMask ("sAlphaToMask", Int) = 0 + } + + HLSLINCLUDE + #define LIL_RENDER 2 + ENDHLSL + + SubShader + { + Tags { "ShaderModel" = "4.5"} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 4.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" + + SubShader + { + Tags {} + HLSLINCLUDE + #define LIL_FEATURE_ANIMATE_MAIN_UV + #define LIL_FEATURE_MAIN_TONE_CORRECTION + #define LIL_FEATURE_MAIN_GRADATION_MAP + #define LIL_FEATURE_MAIN2ND + #define LIL_FEATURE_MAIN3RD + #define LIL_FEATURE_DECAL + #define LIL_FEATURE_ANIMATE_DECAL + #define LIL_FEATURE_LAYER_DISSOLVE + #define LIL_FEATURE_ALPHAMASK + #define LIL_FEATURE_SHADOW + #define LIL_FEATURE_RECEIVE_SHADOW + #define LIL_FEATURE_SHADOW_3RD + #define LIL_FEATURE_SHADOW_LUT + #define LIL_FEATURE_RIMSHADE + #define LIL_FEATURE_EMISSION_1ST + #define LIL_FEATURE_EMISSION_2ND + #define LIL_FEATURE_ANIMATE_EMISSION_UV + #define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV + #define LIL_FEATURE_EMISSION_GRADATION + #define LIL_FEATURE_NORMAL_1ST + #define LIL_FEATURE_NORMAL_2ND + #define LIL_FEATURE_ANISOTROPY + #define LIL_FEATURE_REFLECTION + #define LIL_FEATURE_MATCAP + #define LIL_FEATURE_MATCAP_2ND + #define LIL_FEATURE_RIMLIGHT + #define LIL_FEATURE_RIMLIGHT_DIRECTION + #define LIL_FEATURE_GLITTER + #define LIL_FEATURE_BACKLIGHT + #define LIL_FEATURE_PARALLAX + #define LIL_FEATURE_POM + #define LIL_FEATURE_DISTANCE_FADE + #define LIL_FEATURE_AUDIOLINK + #define LIL_FEATURE_AUDIOLINK_VERTEX + #define LIL_FEATURE_AUDIOLINK_LOCAL + #define LIL_FEATURE_DISSOLVE + #define LIL_FEATURE_DITHER + #define LIL_FEATURE_IDMASK + #define LIL_FEATURE_UDIMDISCARD + #define LIL_FEATURE_OUTLINE_TONE_CORRECTION + #define LIL_FEATURE_OUTLINE_RECEIVE_SHADOW + #define LIL_FEATURE_ANIMATE_OUTLINE_UV + #define LIL_FEATURE_FUR_COLLISION + #define LIL_FEATURE_MainGradationTex + #define LIL_FEATURE_MainColorAdjustMask + #define LIL_FEATURE_Main2ndTex + #define LIL_FEATURE_Main2ndBlendMask + #define LIL_FEATURE_Main2ndDissolveMask + #define LIL_FEATURE_Main2ndDissolveNoiseMask + #define LIL_FEATURE_Main3rdTex + #define LIL_FEATURE_Main3rdBlendMask + #define LIL_FEATURE_Main3rdDissolveMask + #define LIL_FEATURE_Main3rdDissolveNoiseMask + #define LIL_FEATURE_AlphaMask + #define LIL_FEATURE_BumpMap + #define LIL_FEATURE_Bump2ndMap + #define LIL_FEATURE_Bump2ndScaleMask + #define LIL_FEATURE_AnisotropyTangentMap + #define LIL_FEATURE_AnisotropyScaleMask + #define LIL_FEATURE_AnisotropyShiftNoiseMask + #define LIL_FEATURE_ShadowBorderMask + #define LIL_FEATURE_ShadowBlurMask + #define LIL_FEATURE_ShadowStrengthMask + #define LIL_FEATURE_ShadowColorTex + #define LIL_FEATURE_Shadow2ndColorTex + #define LIL_FEATURE_Shadow3rdColorTex + #define LIL_FEATURE_RimShadeMask + #define LIL_FEATURE_BacklightColorTex + #define LIL_FEATURE_SmoothnessTex + #define LIL_FEATURE_MetallicGlossMap + #define LIL_FEATURE_ReflectionColorTex + #define LIL_FEATURE_ReflectionCubeTex + #define LIL_FEATURE_MatCapTex + #define LIL_FEATURE_MatCapBlendMask + #define LIL_FEATURE_MatCapBumpMap + #define LIL_FEATURE_MatCap2ndTex + #define LIL_FEATURE_MatCap2ndBlendMask + #define LIL_FEATURE_MatCap2ndBumpMap + #define LIL_FEATURE_RimColorTex + #define LIL_FEATURE_GlitterColorTex + #define LIL_FEATURE_GlitterShapeTex + #define LIL_FEATURE_EmissionMap + #define LIL_FEATURE_EmissionBlendMask + #define LIL_FEATURE_EmissionGradTex + #define LIL_FEATURE_Emission2ndMap + #define LIL_FEATURE_Emission2ndBlendMask + #define LIL_FEATURE_Emission2ndGradTex + #define LIL_FEATURE_ParallaxMap + #define LIL_FEATURE_AudioLinkMask + #define LIL_FEATURE_AudioLinkLocalMap + #define LIL_FEATURE_DissolveMask + #define LIL_FEATURE_DissolveNoiseMask + #define LIL_FEATURE_OutlineTex + #define LIL_FEATURE_OutlineWidthMask + #define LIL_FEATURE_OutlineVectorTex + #define LIL_FEATURE_FurNoiseMask + #define LIL_FEATURE_FurMask + #define LIL_FEATURE_FurLengthMask + #define LIL_FEATURE_FurVectorTex + #define LIL_OPTIMIZE_APPLY_SHADOW_FA + #define LIL_OPTIMIZE_USE_FORWARDADD + #define LIL_OPTIMIZE_USE_VERTEXLIGHT + #pragma skip_variants LIGHTMAP_ON DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK DIRLIGHTMAP_COMBINED _MIXED_LIGHTING_SUBTRACTIVE + #define LIL_SRP_VERSION_MAJOR 17 + #define LIL_SRP_VERSION_MINOR 0 + #define LIL_SRP_VERSION_PATCH 3 + + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS + #pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2 + #pragma skip_variants _SCREEN_SPACE_OCCLUSION + ENDHLSL + + + // Forward Back + Pass + { + Name "FORWARD_BACK" + Tags {"LightMode" = "SRPDefaultUnlit"} + + Stencil + { + Ref [_PreStencilRef] + ReadMask [_PreStencilReadMask] + WriteMask [_PreStencilWriteMask] + Comp [_PreStencilComp] + Pass [_PreStencilPass] + Fail [_PreStencilFail] + ZFail [_PreStencilZFail] + } + Cull [_PreCull] + ZClip [_PreZClip] + ZWrite [_PreZWrite] + ZTest [_PreZTest] + ColorMask [_PreColorMask] + Offset [_PreOffsetFactor], [_PreOffsetUnits] + BlendOp [_PreBlendOp], [_PreBlendOpAlpha] + Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha] + AlphaToMask [_PreAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_TRANSPARENT_PRE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward + Pass + { + Name "FORWARD" + Tags {"LightMode" = "UniversalForward"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + AlphaToMask [_AlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // Forward Outline + Pass + { + Name "FORWARD_OUTLINE" + Tags {"LightMode" = "UniversalForwardOnly"} + + Stencil + { + Ref [_OutlineStencilRef] + ReadMask [_OutlineStencilReadMask] + WriteMask [_OutlineStencilWriteMask] + Comp [_OutlineStencilComp] + Pass [_OutlineStencilPass] + Fail [_OutlineStencilFail] + ZFail [_OutlineStencilZFail] + } + Cull [_OutlineCull] + ZClip [_OutlineZClip] + ZWrite [_OutlineZWrite] + ZTest [_OutlineZTest] + ColorMask [_OutlineColorMask] + Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] + BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha] + Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha] + AlphaToMask [_OutlineAlphaToMask] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _SHADOWS_SOFT + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _FORWARD_PLUS + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_FORWARD + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #define LIL_OUTLINE + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_forward.hlsl" + + ENDHLSL + } + + // ShadowCaster + Pass + { + Name "SHADOW_CASTER" + Tags {"LightMode" = "ShadowCaster"} + Cull [_Cull] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_SHADOWCASTER + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_shadowcaster.hlsl" + + ENDHLSL + } + + // DepthOnly + Pass + { + Name "DEPTHONLY" + Tags {"LightMode" = "DepthOnly"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHONLY + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthonly.hlsl" + + ENDHLSL + } + + // DepthNormals + Pass + { + Name "DEPTHNORMALS" + Tags {"LightMode" = "DepthNormals"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_DEPTHNORMALS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_depthnormals.hlsl" + + ENDHLSL + } + + // MotionVectors + Pass + { + Name "MOTIONVECTORS" + Tags {"LightMode" = "MotionVectors"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma instancing_options renderinglayer + #define LIL_PASS_MOTIONVECTORS + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_motionvectors.hlsl" + + ENDHLSL + } + + // Universal2D + Pass + { + Name "UNIVERSAL2D" + Tags {"LightMode" = "Universal2D"} + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilComp] + Pass [_StencilPass] + Fail [_StencilFail] + ZFail [_StencilZFail] + } + Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha] + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_universal2d.hlsl" + + ENDHLSL + } + + // Meta + Pass + { + Name "META" + Tags {"LightMode" = "Meta"} + Cull Off + + HLSLPROGRAM + + //---------------------------------------------------------------------------------------------------------------------- + // Build Option + #pragma vertex vert + #pragma fragment frag + #pragma shader_feature EDITOR_VISUALIZATION + #define LIL_PASS_META + + //---------------------------------------------------------------------------------------------------------------------- + // Pass + #include "Includes/lil_pipeline_urp.hlsl" + #include "Includes/lil_common.hlsl" + // Insert functions and includes that depend on Unity here + + #include "Includes/lil_pass_meta.hlsl" + + ENDHLSL + } + + } + Fallback "Universal Render Pipeline/Unlit" +} diff --git a/Assets/External/lilToon/Shader/ltspass_transparent.shader.meta b/Assets/External/lilToon/Shader/ltspass_transparent.shader.meta new file mode 100644 index 00000000..7eaa265e --- /dev/null +++ b/Assets/External/lilToon/Shader/ltspass_transparent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2683fad669f20ec49b8e9656954a33a8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture.meta b/Assets/External/lilToon/Texture.meta new file mode 100644 index 00000000..62239899 --- /dev/null +++ b/Assets/External/lilToon/Texture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 263cdf3622ef90d4990ece3fbfe07b44 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_bayer_16x16.png b/Assets/External/lilToon/Texture/lil_bayer_16x16.png new file mode 100644 index 00000000..2f80709a --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_16x16.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b80531b11be340aa8e93be489b2419f08afe2bbcdcf5dee80848c3e880f63df1 +size 421 diff --git a/Assets/External/lilToon/Texture/lil_bayer_16x16.png.meta b/Assets/External/lilToon/Texture/lil_bayer_16x16.png.meta new file mode 100644 index 00000000..a4f0a597 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_16x16.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: f6af462667a53734aa2bdb88cd28773e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 63 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_bayer_2x2.png b/Assets/External/lilToon/Texture/lil_bayer_2x2.png new file mode 100644 index 00000000..10ea80e3 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_2x2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bc2201d5eaa5e846eee83150f8cb2f968a043772a236ae81c50961cc43611f9 +size 73 diff --git a/Assets/External/lilToon/Texture/lil_bayer_2x2.png.meta b/Assets/External/lilToon/Texture/lil_bayer_2x2.png.meta new file mode 100644 index 00000000..850989a6 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_2x2.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 0fe8c123eabd3d144b64f3ad8e46ca9d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 63 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_bayer_4x4.png b/Assets/External/lilToon/Texture/lil_bayer_4x4.png new file mode 100644 index 00000000..3c971f28 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_4x4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8874ed7b122f166721a09ec215df69efaa675decdafb22a39d01dfaaaa350d39 +size 101 diff --git a/Assets/External/lilToon/Texture/lil_bayer_4x4.png.meta b/Assets/External/lilToon/Texture/lil_bayer_4x4.png.meta new file mode 100644 index 00000000..bb6fb951 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_4x4.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 5bf614e5cd085334fb250d85ecf4add8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 63 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_bayer_8x8.png b/Assets/External/lilToon/Texture/lil_bayer_8x8.png new file mode 100644 index 00000000..c1230c1c --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_8x8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0caca0a4eda79aa8f215d03ff4e61ee78211dac4ef710259be88f0b92bc9ee6f +size 170 diff --git a/Assets/External/lilToon/Texture/lil_bayer_8x8.png.meta b/Assets/External/lilToon/Texture/lil_bayer_8x8.png.meta new file mode 100644 index 00000000..5edb29a1 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_bayer_8x8.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 7beb7d447aa213a44bbb0146e0604f76 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 63 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_emission_rainbow.png b/Assets/External/lilToon/Texture/lil_emission_rainbow.png new file mode 100644 index 00000000..9fe8fd3b --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_emission_rainbow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2615fc5cd884933f0ec45174d4e4ba34be9e6c044edac257e2e3f6862d4b0de0 +size 186 diff --git a/Assets/External/lilToon/Texture/lil_emission_rainbow.png.meta b/Assets/External/lilToon/Texture/lil_emission_rainbow.png.meta new file mode 100644 index 00000000..b7548d47 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_emission_rainbow.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: dddb8b9e8cea6b745b98704db1437c88 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_noise_1d.png b/Assets/External/lilToon/Texture/lil_noise_1d.png new file mode 100644 index 00000000..ccab2d43 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_noise_1d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebeb8469167db9b4b806d14f242f45b1b91bcc6a09dd2c09247e07ad74f8d1c3 +size 574 diff --git a/Assets/External/lilToon/Texture/lil_noise_1d.png.meta b/Assets/External/lilToon/Texture/lil_noise_1d.png.meta new file mode 100644 index 00000000..c6eb2109 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_noise_1d.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 5e5f849189d66b1448d63883a5f9195a +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_noise_fur.png b/Assets/External/lilToon/Texture/lil_noise_fur.png new file mode 100644 index 00000000..58b8a429 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_noise_fur.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:142d13f59287c5d4e000760a019886ea5c7925fedf1f695b5d945ca766898b97 +size 49671 diff --git a/Assets/External/lilToon/Texture/lil_noise_fur.png.meta b/Assets/External/lilToon/Texture/lil_noise_fur.png.meta new file mode 100644 index 00000000..d12becb1 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_noise_fur.png.meta @@ -0,0 +1,134 @@ +fileFormatVersion: 2 +guid: 3d421fc7bc8924f4985df741bf8d70ed +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 1 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_noise_fur_2.png b/Assets/External/lilToon/Texture/lil_noise_fur_2.png new file mode 100644 index 00000000..bb7be383 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_noise_fur_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89682c08cee076054dd022ac37aa2a303ee33cfa09984050a132db6033a39c43 +size 67269 diff --git a/Assets/External/lilToon/Texture/lil_noise_fur_2.png.meta b/Assets/External/lilToon/Texture/lil_noise_fur_2.png.meta new file mode 100644 index 00000000..83a3ba0d --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_noise_fur_2.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: 8a7dbcb2f4a32ec4297486403aee5f74 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_shape_hex.png b/Assets/External/lilToon/Texture/lil_shape_hex.png new file mode 100644 index 00000000..fd4ab859 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_shape_hex.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a82715cec9dd3cccffabb712b577bf6e49cd1b6d7e5cf6c0bcbf0d5f4e3922c +size 776 diff --git a/Assets/External/lilToon/Texture/lil_shape_hex.png.meta b/Assets/External/lilToon/Texture/lil_shape_hex.png.meta new file mode 100644 index 00000000..d0a04c76 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_shape_hex.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: cbd6b66929773a2418b39e21703893b0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 1 + borderMipMap: 1 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 4 + mipMapFadeDistanceEnd: 5 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_shape_snowflakes.png b/Assets/External/lilToon/Texture/lil_shape_snowflakes.png new file mode 100644 index 00000000..a16e3197 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_shape_snowflakes.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:babfb488d95389e6d602d7375ac36bfce3b786d6a5adf665bf3020fa5624ab0e +size 9994 diff --git a/Assets/External/lilToon/Texture/lil_shape_snowflakes.png.meta b/Assets/External/lilToon/Texture/lil_shape_snowflakes.png.meta new file mode 100644 index 00000000..3725c25c --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_shape_snowflakes.png.meta @@ -0,0 +1,134 @@ +fileFormatVersion: 2 +guid: 7d5796044ffe6f84a89374673b9dfd78 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 1 + borderMipMap: 1 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 4 + mipMapFadeDistanceEnd: 5 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_shape_star.png b/Assets/External/lilToon/Texture/lil_shape_star.png new file mode 100644 index 00000000..ac1fdb6a --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_shape_star.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b015ac9b0a4807fa1b12c1ae13f9f0fe0397b794e5e985df9ba3082b5f6e64a1 +size 1587 diff --git a/Assets/External/lilToon/Texture/lil_shape_star.png.meta b/Assets/External/lilToon/Texture/lil_shape_star.png.meta new file mode 100644 index 00000000..08911282 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_shape_star.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: 66e9f2f309eba6543886cbfc714d5276 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 1 + borderMipMap: 1 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 4 + mipMapFadeDistanceEnd: 5 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_tangent.png b/Assets/External/lilToon/Texture/lil_tangent.png new file mode 100644 index 00000000..89ce1142 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_tangent.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2858e3ed3ceb4aef33dd35e45446d904894153c7ae830ae063105c807ab7ff8c +size 163 diff --git a/Assets/External/lilToon/Texture/lil_tangent.png.meta b/Assets/External/lilToon/Texture/lil_tangent.png.meta new file mode 100644 index 00000000..003ad549 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_tangent.png.meta @@ -0,0 +1,180 @@ +fileFormatVersion: 2 +guid: 8704ec8533a146d4daf20c45658e92ab +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Lumin + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/lil_tangent_circular.png b/Assets/External/lilToon/Texture/lil_tangent_circular.png new file mode 100644 index 00000000..d3b2708d --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_tangent_circular.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05090cc9531c76a1922d971e37322dfa3d1bf0014b6328c6da4f99126f7c80e3 +size 13301 diff --git a/Assets/External/lilToon/Texture/lil_tangent_circular.png.meta b/Assets/External/lilToon/Texture/lil_tangent_circular.png.meta new file mode 100644 index 00000000..5d8041f6 --- /dev/null +++ b/Assets/External/lilToon/Texture/lil_tangent_circular.png.meta @@ -0,0 +1,134 @@ +fileFormatVersion: 2 +guid: aa232ebfdb3318845b4de050c61dc2c6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Texture/matcap_metal_realistic.png b/Assets/External/lilToon/Texture/matcap_metal_realistic.png new file mode 100644 index 00000000..88c52df0 --- /dev/null +++ b/Assets/External/lilToon/Texture/matcap_metal_realistic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:870ba85b3cbf3389469e887b12b4b527695f32888392e263f0413685a06973d2 +size 96563 diff --git a/Assets/External/lilToon/Texture/matcap_metal_realistic.png.meta b/Assets/External/lilToon/Texture/matcap_metal_realistic.png.meta new file mode 100644 index 00000000..ceb19ba4 --- /dev/null +++ b/Assets/External/lilToon/Texture/matcap_metal_realistic.png.meta @@ -0,0 +1,134 @@ +fileFormatVersion: 2 +guid: a06ed8ab718f1884fa52fe010de1c3c7 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/Third Party Notices.md b/Assets/External/lilToon/Third Party Notices.md new file mode 100644 index 00000000..a341019a --- /dev/null +++ b/Assets/External/lilToon/Third Party Notices.md @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce73439f12bd1e95d6413f49979b2cffa5b5dfbc9be5997fc73c60405e63a031 +size 8995 diff --git a/Assets/External/lilToon/Third Party Notices.md.meta b/Assets/External/lilToon/Third Party Notices.md.meta new file mode 100644 index 00000000..94994929 --- /dev/null +++ b/Assets/External/lilToon/Third Party Notices.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f206f66109fb1a040a1a9ac212ff8f41 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/External/lilToon/package.json b/Assets/External/lilToon/package.json new file mode 100644 index 00000000..2969fcef --- /dev/null +++ b/Assets/External/lilToon/package.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d79ab77710c9a87f72df77c6464408fe634b2819969c0a7e22223ad9bfe7c7 +size 694 diff --git a/Assets/External/lilToon/package.json.meta b/Assets/External/lilToon/package.json.meta new file mode 100644 index 00000000..86ff993f --- /dev/null +++ b/Assets/External/lilToon/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 397d2fa9e93fb5d44a9540d5f01437fc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Development scene.unity b/Assets/Scenes/Development scene.unity index 7291880b..2c91eaed 100644 --- a/Assets/Scenes/Development scene.unity +++ b/Assets/Scenes/Development scene.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:331798cc8d0da5ca6d677a5b73d574d4d5ed0d7dccaeb3459c6bed52a8c60a06 -size 83947 +oid sha256:d1c32c95e7ba9216c9500d5a1b60b253eab0a1c40ddae922ef363a23434043ba +size 107639